doMCMC: Perform MCMC model fitting for an SBFAC model...

Description Usage Arguments Details Value

Description

Perform MCMC model fitting for an SBFAC model

Usage

1
doMCMC(model, nsim, nburn, thin=1, print.status=200, keep.scores=FALSE, keep.loadings=TRUE)

Arguments

model

an object of type sbfac, as returned by sbfac(data)

nsim

number of iterations past burn-in

nburn

number of initial (burn-in) iterations to discard

thin

keep every thin'th MCMC sample (i.e. save nsim/thin samples)

print.status

how often to print status messages to console

keep.scores

save samples of factor scores

keep.loadings

save samples of factor loadings

Details

This function performs a specified number of MCMC iterations and returns an sbfac object containing summary statistics from the MCMC samples as well as the actual samples if keep.scores or keep.loadings are TRUE. Default behavior is to save only the loadings. It is recommended to examine traces and marginal posterior density estimates for the loadings as these can be highly skewed and/or multimodal so that the mean/variance are poor summaries. The scores are generally more 'normal'-looking. Take care with these settings as the samples can be very high dimensional.

Value

The S3 sbfac object model, now with posterior samples/summaries.


sbfac documentation built on May 2, 2019, 5:57 p.m.