This function estimates a nested probit model based on a given
RprobitB_fit object.
# S3 method for RprobitB_fit
update(
object,
form,
re,
alternatives,
id,
idc,
standardize,
impute,
scale,
R,
B,
Q,
print_progress,
prior,
latent_classes,
...
)An object of class RprobitB_fit.
An object of class RprobitB_fit.
[formula]
A model description with the structure choice ~ A | B | C, where
choice is the name of the dependent variable (the choices),
A are names of alternative and choice situation specific
covariates with a coefficient that is constant across alternatives,
B are names of choice situation specific covariates with
alternative specific coefficients,
and C are names of alternative and choice situation specific
covariates with alternative specific coefficients.
Multiple covariates (of one type) are separated by a + sign.
By default, alternative specific constants (ASCs) are added to the model.
They can be removed by adding +0 in the second spot.
In the ordered probit model (ordered = TRUE), the formula
object has the simple structure choice ~ A. ASCs are not estimated.
[character() | NULL]
Names of covariates with random effects.
If re = NULL (the default), there are no random effects.
To have random effects for the ASCs, include "ASC" in re.
[character()]
The names of the choice alternatives. If not specified, the choice set is
defined by the observed choices.
If ordered = TRUE, alternatives is assumed to be specified with
the alternatives ordered from worst to best.
[character(1)]
The name of the column in choice_data that contains unique identifier
for each decision maker.
[character(1)]
The name of the column in choice_data that contains
unique identifier for each choice situation of each decision maker.
By default, these identifier are generated by the order of appearance.
[character() | "all"]
Names of covariates that get standardized.
Covariates of type 1 or 3 have to be addressed by
<covariate>_<alternative>.
If standardize = "all", all covariates get standardized.
A character that specifies how to handle missing covariate entries in
choice_data, one of:
"complete_cases", removes all rows containing missing
covariate entries (the default),
"zero", replaces missing covariate entries by zero
(only for numeric columns),
"mean", imputes missing covariate entries by the mean
(only for numeric columns).
[character(1)]
A character which determines the utility scale. It is of the form
<parameter> := <value>, where <parameter> is either the name of a fixed
effect or Sigma_<j>,<j> for the <j>th diagonal element of Sigma, and
<value> is the value of the fixed parameter.
[integer(1)]
The number of iterations of the Gibbs sampler.
[integer(1)]
The length of the burn-in period.
[integer(1)]
The thinning factor for the Gibbs samples.
[logical(1)]
Print the Gibbs sampler progress?
[list]
A named list of parameters for the prior distributions. See the documentation
of check_prior for details about which parameters can be
specified.
[list() | NULL]
Optionally parameters specifying the number of latent classes and their
updating scheme. The values in brackets are the default.
C (1): The fixed number (greater or equal 1) of (initial) classes.
wb_update (FALSE): Set to TRUE for weight-based class updates.
dp_update (FALSE): Set to TRUE for Dirichlet process class updates.
Cmax (10): The maximum number of latent classes.
The following specifications are used for the weight-based updating scheme:
buffer (50): The number of iterations to wait before the next update.
epsmin (0.01): The threshold weight for removing a latent class.
epsmax (0.7): The threshold weight for splitting a latent class.
deltamin (0.1): The minimum mean distance before merging two classes.
deltashift (0.5): The scale for shifting the class means after a split.
Currently not used.
All parameters (except for object) are optional and if not specified
retrieved from the specification for object.