Supplies a list of values for logical switches indicating whether parameters of interest (means, scores, loadings, uniquenesses, and mixing proportions) should be stored when running models from the IMIFA family via mcmc_IMIFA
. It may be useful not to store certain parameters if memory is an issue.
storeControl(mu.switch = TRUE,
score.switch = TRUE,
load.switch = TRUE,
psi.switch = TRUE,
pi.switch = TRUE,
update.mu = mu.switch,
...)
A named vector in which the names are the names of the storage switches and the values are logicals indicating whether that parameter is to be stored. The list also contains as an attribute a logical for each switch indicating whether it was actually supplied (TRUE
) or the default was accepted (FALSE
).
Logical indicating whether the means are to be stored (defaults to TRUE
).
Logical indicating whether the factor scores are to be stored.
As the array containing each sampled scores matrix tends to be amongst the largest objects to be stored, this defaults to FALSE
inside mcmc_IMIFA
when length(range.G) * length(range.Q) > 10
, otherwise the default is TRUE
. For the "MIFA"
, "OMIFA"
, and "IMIFA"
methods, setting this switch to FALSE
also offers a slight speed-up.
Unlike other parameters, the scores need not be stored for posterior predictive checking (see Note below).
Logical indicating whether the factor loadings are to be stored (defaults to TRUE
).
Logical indicating whether the uniquenesses are to be stored (defaults to TRUE
).
Logical indicating whether the mixing proportions are to be stored (defaults to TRUE
).
Logical indicating whether the means should be updated. Only relevant for the "FA"
and "IFA"
methods when centering=TRUE
in mixfaControl
, otherwise means are always updated. Setting update.mu=FALSE
forces mu.switch
to FALSE
, but mu.switch=FALSE
can still be used in conjunction with update.mu=TRUE
.
Catches unused arguments.
Keefe Murphy - <keefe.murphy@mu.ie>
storeControl
is provided for assigning values for IMIFA models within mcmc_IMIFA
. It may be useful not to store certain parameters if memory is an issue (e.g. for large data sets or for a large number of MCMC iterations after burnin and thinning).
mcmc_IMIFA
, get_IMIFA_results
, mixfaControl
, mgpControl
, bnpControl
stctrl <- storeControl(score.switch=FALSE)
# data(olive)
# sim <- mcmc_IMIFA(olive, "IMIFA", n.iters=5000, storage=stctrl)
# Alternatively specify these arguments directly
# sim <- mcmc_IMIFA(olive, "IMIFA", n.iters=5000, score.switch=FALSE)
Run the code above in your browser using DataLab