- data
A matrix containing the raw data.
The first column the respondent identifier, followed by the design number, the remaining
columns indicate the choices for the tasks that coincide to the design file.
- design
A matrix representing the coded (dummy of effects) design file. The design file should be
formatted as a matrix with number of versions X number of tasks X number of alternatives
rows and number of parameters + 3 columns. The first column contains the version number,
the second columns contains the task number, the third column contains the alternative,
and the remaining columns contain the coded design. A generic Sawtooth Software design
file can be converted to this format using the code_sawtooth_design function.
- Priors
A data structure that contains the priors for to the model. Can be null indicating
the use of default priors or must contain a full prior specification.
- R
The number of repetitions in the chain
- keepEvery
saves every keepEvery-th draw for output
- verbose
Print intermediate results to the screen (default = TRUE)
- num_lambda_segments
(Default = 2) The number of segments for the scale factor
- constraints
(Optional) a vector of length n-param specifying the constraints
to impose on the parameters or NULL. a 1 indicates the parameter is constrained to be positive
a -1 constrains to be negative, and a 0 indicates no constraint.
- startingValues
(Optional) starting values to use for the MCMC algorithm. This is a list of
containing: slope = a nRespondent by nParamter matrix of slopes for the respondent
slopeBar = a nParameter vector of the slopeBar parameter
slopeCov = a nParameter by nParameter matrix containing the variance covariance matrix
for the slopeBar parameter
lambda = a nSegment vector containing the starting values for the lambda parameters. The first
element in the vector should be 1.
segMembership = a nRespondent vector containing the segment membership for each respondent.
phi_lambda = a nParameter vector containing the base probabilities that an individual belongs
to each segment. Should sum to 1.
- previous_iterations
The number of previous iterations run. This parameter is used for the Atchade
adaptive MCMC step size algorithm. This is used since the Atchade update does not happen for less
than 1000 iterations. (Default = 0)
- Atchade_slope_tuning
The tuning factor to use for Atchade step for the slopes parameter. Larger values
decrease the acceptance rate. (Default = 0.01)
- Atchade_lambda_tuning
The tuning factor to use for the Atchade step for the lambda parameter. Larger
values decrease the acceptance rate. (Default = 10)