- X
n x p input matrix, where n is the number of samples, and p
is the number of variables. X cannot be sparse, and cannot have any
missing values (NA).
- Z
n x m covariate data matrix, where m is the number of
covariates. Do not supply an intercept as a covariate (i.e., a
column of ones), because an intercept is automatically included in
the regression model. For no covariates, set Z = NULL
.
- y
Vector of length n containing values of the continuous
outcome.
- sa
Vector specifying the prior variance of the regression
coefficients (scaled by sigma
) for each mixture component. If
not specified, a "reasonable" set of prior variances is
automatically selected based on a simple regression analysis in
which all variables (columns of X
) are treated as
independent. To override this default, set sa
to vector of
variances in which the first mixture component is the "spike", and
therefore should be zero. Alternatively, sa
may be an integer
greater than 1, in which case this controls the number of mixture
components, and the variances of the individual mixture components
are automatically selected as described.
- sigma
Residual variance parameter. If missing, it is
automatically fitted to the data by computing an approximate
maximum-likelihood estimate.
- w
If missing, it is automatically fitted to the data by
computing an approximate maximum-likelihood estimate.
- alpha
Initial estimates of the approximate posterior mixture
assignment probabilities. These should be specified as a p x K
matrix, where K is the number of mixture components. Each row must
add up to 1.
- mu
Initial estimates of the approximate regression coefficients
conditioned on being drawn from each of the K mixture
components. These estimates should be provided as a p x K matrix,
where K is the number of mixture components.
- update.sigma
If TRUE
, sigma is fitted to data using an
approximate EM algorithm, in which case argument sigma
, if
provided, is the initial estimate.
- update.sa
Currently, estimate of mixture component variances is
not implemented, so this must be set to TRUE
, otherwise an
error will be generated.
- update.w
If TRUE
, mixture weights are fitted using an
approximate EM algorithm, in which case argument w
, if
provided, is the initial estimate.
- w.penalty
Penalty term for the mixture weights. It is useful
for "regularizing" the estimate of w
when we do not have a
lot of information. It should be a vector with one positive entry
for each mixture component. Larger values place more weight on the
corresponding mixture components. It is based on the Dirichlet
distribution with parameters w.penalty
. The default is a
vector of ones, which reduces to a uniform prior on w
.
- drop.threshold
Posterior probability threshold for dropping
mixture components. Should be a positive number close to zero. If,
at any point during the optimization, all posterior mixture
assignment probabilities for a given mixture component k
are
less than drop.threshold
, the mixture weight for component
k
is automatically set to zero. Set drop.threshold
to
zero to disable this behaviour. Setting larger values for
drop.threshold
may improve computation speed at a small cost
to numerical accuracy of the final results.
- tol
Convergence tolerance for co-ordinate ascent updates.
- maxiter
Maximum number of co-ordinate ascent iterations.
- update.order
Order of the co-ordinate ascent updates for
fitting the variational approximation. The default is
update.order = 1:p
, where p
is the number of variables
(the number of columns of X
).
- verbose
If verbose = TRUE
, print progress of algorithm
to console.