storeControl {IMIFA} | R Documentation |
Set storage values for use with the IMIFA family of models
Description
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.
Usage
storeControl(mu.switch = TRUE,
score.switch = TRUE,
load.switch = TRUE,
psi.switch = TRUE,
pi.switch = TRUE,
update.mu = mu.switch,
...)
Arguments
mu.switch |
Logical indicating whether the means are to be stored (defaults to |
score.switch |
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 Unlike other parameters, the scores need not be stored for posterior predictive checking (see Note below). |
load.switch |
Logical indicating whether the factor loadings are to be stored (defaults to |
psi.switch |
Logical indicating whether the uniquenesses are to be stored (defaults to |
pi.switch |
Logical indicating whether the mixing proportions are to be stored (defaults to |
update.mu |
Logical indicating whether the means should be updated. Only relevant for the |
... |
Catches unused arguments. |
Details
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).
Value
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
).
Note
Posterior inference and plotting won't be possible for parameters not stored.
Non-storage of parameters will almost surely prohibit the computation of posterior predictive checking error metrics within get_IMIFA_results
also. In particular, if such error metrics are desired, psi.switch
must be TRUE
for all but the "FA"
and "IFA"
models, mu.switch
must be TRUE
except in situations where update.mu=FALSE
is allowed, load.switch
must be TRUE
for all but the entirely zero-factor models, and pi.switch
must be TRUE
for models with clustering structure and unequal mixing proportions for all but the PPRE metric. score.switch=TRUE
is not required for any posterior predictive checking.
If post-hoc adaptation is invoked in get_IMIFA_results
on a model fitted without adaptation, store.switch=TRUE
is not required unless active.crit="SC"
(for "IFA"
models only); load.switch=TRUE
is required for both active.crit="BD"
and active.crit="SC"
.
Finally, if loadings are not stored but scores are, caution is advised when examining posterior scores as Procrustes rotation will not occur within get_IMIFA_results
.
Author(s)
Keefe Murphy - <keefe.murphy@mu.ie>
See Also
mcmc_IMIFA
, get_IMIFA_results
, mixfaControl
, mgpControl
, bnpControl
Examples
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)