Learn R Programming

mirt (version 0.2.1)

fscores: Methods for Function fscores

Description

Computes MAP, EAP, or ML factor scores for mirt and bfactor models, or a stochastic approximation with a multivariate normal prior for polymirt and confmirt. Note that only the general factor scores are computed for bifactor models.

Arguments

object
a model of class mirtClass, bfactorClass, polymirtClass, or confmirtClass
full.scores
if FALSE (default) then a summary table with factor scores for each unique pattern is displayed. Otherwise the original data matrix is returned with the computed factor scores appended to the rightmost column
method
type of factor score estimation method. Can be expected a-posteriori ("EAP"), Bayes modal ("MAP"), or maximum likelihood ("ML")
ndraws
number of MH samples to draw for each response pattern
thin
controls how much the chain should be thinned by, default collects every 5th draw (thin = 5). Note that ndraws/thin must be a whole number
...
additional arguments to be passed

Value

  • Returns either a summary table with the response patterns and expected factor scores, or a complete data matrix with factor scores appended to the last column.

Examples

Run this code
tabscores <- fscores(mod)
fullscores <- fscores(mod, full.scores = TRUE)
fullscores <- fscores(mod, full.scores = TRUE, method='MAP')

Run the code above in your browser using DataLab