pcFactorStan (version 0.11)

findModel: Given a model name, return stanmodel object

Description

This is a convenience function to help you look up the path to an appropriate model for your data.

Usage

findModel(model = NULL)

Arguments

model

the name of a model

Value

An instance of S4 class stanmodel that can be passed to pcStan.

Details

There are essentially three models: ‘unidim’, ‘covariance’, and ‘factor’. ‘unidim’ analyzes a single item. ‘covariance’ is suitable for two or more items. Once you have vetted your items with the ‘unidim’ and ‘covariance’ models, then you can try the ‘factor’ model. For each model, there is a ‘_ll’ variation. This model includes row-wise log likelihoods suitable for feeding to loo for efficient approximate leave-one-out cross-validation.

There is also a special model ‘unidim_adapt’. Except for this model, the other models require a scaling constant. To find an appropriate scaling constant, we recommend fitting ‘unidim_adapt’ to each item separately and then take the median of median point estimates to set the scale. ‘unidim_adapt’ requires a varCorrection constant. In general, a varCorrection of 2.0 or 3.0 should provide optimal results.

Examples

Run this code
# NOT RUN {
findModel()  # shows available models
findModel('unidim')
# }

Run the code above in your browser using DataLab