Learn R Programming

mirt (version 0.4.2)

fscores: Methods for Function fscores

Description

Computes MAP, EAP, WLE, or ML factor scores with a multivariate normal prior distribution.

Usage

fscores(object, rotate = "", full.scores = FALSE,
    method = "EAP", quadpts = NULL, response.vector = NULL,
    degrees = NULL, verbose = TRUE)

Arguments

object
a computed model object of class ExploratoryClass, ConfirmatoryClass, or MultipleGroupClass
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
rotate
rotation declaration to be used when estimating the factor scores. If "" then the object@rotate default value is used (only applicable to ExploratoryClass objects)
method
type of factor score estimation method. Can be expected a-posteriori ("EAP"), Bayes modal ("MAP"), weighted likelihood estimation ("WLE"), or maximum likelihood ("ML")
quadpts
number of quadratures to use per dimension
degrees
the degrees argument to be passed to iteminfo, only necessary for multidimensional models when method = 'WLE'
response.vector
an optional argument used to calculate the factor scores and standard errors for a given response vector that may or may not have been in the original dataset
verbose
logical; print verbose output messages?

Examples

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

#calculate MAP for a given response vector
fscores(mod, method='MAP', response.vector = c(1,2,3,4))

Run the code above in your browser using DataLab