Learn R Programming

spdesign (version 0.0.5)

Designing Stated Preference Experiments

Description

Contemporary software commonly used to design stated preference experiments are expensive and the code is closed source. This is a free software package with an easy to use interface to make flexible stated preference experimental designs using state-of-the-art methods. For an overview of stated choice experimental design theory, see e.g., Rose, J. M. & Bliemer, M. C. J. (2014) in Hess S. & Daly. A. . The package website can be accessed at . We acknowledge funding from the European Union’s Horizon 2020 research and innovation program under the Marie Sklodowska-Curie grant INSPiRE (Grant agreement ID: 793163).

Copy Link

Version

Install

install.packages('spdesign')

Monthly Downloads

187

Version

0.0.5

License

CC BY-SA 4.0

Issues

Pull Requests

Stars

Forks

Maintainer

Erlend Dancke Sandorf

Last Published

October 18th, 2024

Functions in spdesign (0.0.5)

all_priors_and_levels_specified

Check whether all priors and attributes have specified levels
attribute_names

Generic for getting the attribute names
any_duplicates

Check whether any priors or attributes are specified with a value more than once
coef.spdesign

Generic for extracting the vector of priors
clean_utility

Cleans the utility expression
digitize

Expand the sequence of integers
extract_distribution

Extract distributions
.onAttach

Print package startup message
extract_param_names

Extract parameter names
derive_vcov_rpl

Derive the variance covariance matrix for the RPL model
derive_vcov_mnl

Derive the variance covariance matrix for the MNL model
block

Block the design
define_x_j

Define x_j
calculate_d_error

D-error
contains_dummies

Check whether the utility function contains dummy coded variables
attribute_level_balance

Check whether we can achieve attribute level balance
attribute_levels

Generic for getting the attributes and levels from the utility function
cor

Correlation
extract_unparsed_values

Extract unparsed named values of the utilitiy function
extract_specified

Extract specified
has_bayesian_prior

Tests whether the utility expression contains Bayesian priors
generate_design

Generate an efficient experimental design
probabilities_mnl

Calculate the MNL probabilities
probabilities

Calculate the probabilities of the design
extract_prior_distribution

Extract the prior distribution
generate_rsc_candidate

Generates a candidate for the RSC algorithm
derive_vcov

Derive the variance covariance matrix of the design
calculate_efficiency

Calculate efficiency
cycle

Cycling of attribute levels
extract_level_occurrence

Extract the frequency of levels
define_base_x_j

Define base x_j
expand_attribute_levels

Expand the list of attributes and levels to the "wide" format
exclude

Exclude rows from the candidate set
federov

Find a design using a modified Federov algorithm
remove_round_brackets

Remove round bracket
has_random_parameter

Tests whether the utility expression contains random parameters
remove_prior

Removes the parameter from the utility string
radical_inverse

Compute the radical inverse
random

Make a random design
extract_values

Extract the value argument(s)
min_lvl_occurrence

Find minimum level occurrences
nlvls

Find the number of levels
swap

Swapping of attribute
extract_param_distribution

Extract the parameter distribution
evaluate_design_candidate

Evaluate the design candidate
is_balanced

Tests whether a utility function is balanced
extract_named_values

Extracts the named values of the utility function
dummy_names

Find the position of the dummy coded attributes
lvl_occurrences

Attribute level occurrence lookup tables
make_scrambled_halton

Make scrambled Halton draws
make_scrambled_sobol

Make scrambled sobol draws
make_draws

Make random draws
make_standard_halton

Wrapper for halton()
make_standard_sobol

Make sobol draws
occurrences

Extract or set attribute level occurrences
print_initial_header

Prints the initial header for the table of results
print_efficiency_criteria

Creates a printable version of the efficiency criteria
normal

Evaluating a distribution
level_balance

Print level balance of your design
print_iteration_information

Prints iteration information
remove_whitespace

Remove all white spaces
update_utility

Update the utility function
remove_square_brackets

Remove square bracket
transform_uniform

Transform to the uniform distribution
priors

Generic for extracting the vector of priors
reexports

Objects exported from other packages
random_design_candidate

Create a random design_object candidate
transform_lognormal

Transform to the lognormal distribution
transform_distribution

Transform distribution
rep_cols

Repeat columns
too_small

Check if the design is too small
rsc

Make a design candidate based on the rsc algorithm
summary.spdesign

Create a summary of the experimental design
set_default_level_occurrence

Sets the default level occurrence in an attribute level balanced design
rep_rows

Repeat rows
spdesign-package

spdesign: Designing Stated Preference Experiments
calculate_a_error

A-error
calculate_s_error

S-error
extract_all_names

Extract all names
calculate_efficiency_criteria

Calculate efficiency criteria
calculate_c_error

C-error
vcov.spdesign

Extract the variance co-variance matrix
utility_formula

Create formulas from the utility functions
extract_attribute_names

Extract attribute names
make_pseudo_random

Make pseudo random draws
make_mlhs

Make Modified Latin Hypercube Draws
fits_lvl_occurrences

Test whether a design candidate fits the constraints imposed by the level occurrences
full_factorial

Generate the full factorial
prepare_priors

Prepare the list of priors
print.spdesign

A generic function for printing an 'spdesign' object
relabel

Relabeling of attribute levels
set_default_options

Validate design opt
remove_all_brackets

Removes all brackets
shuffle

Shuffle the order of points in the unit interval.
transform_normal

Transform to the normal distribution
transform_triangular

Transform to the triangular distribution