Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


ltm (version 1.1-1)

fitted: Fitted Values for IRT model

Description

Computes the expected frequencies for vectors of response patterns.

Usage

# S3 method for gpcm
fitted(object, resp.patterns = NULL, 
    type = c("expected", "marginal-probabilities",
    "conditional-probabilities"), …)

# S3 method for grm fitted(object, resp.patterns = NULL, type = c("expected", "marginal-probabilities", "conditional-probabilities"), …)

# S3 method for ltm fitted(object, resp.patterns = NULL, type = c("expected", "marginal-probabilities", "conditional-probabilities"), …)

# S3 method for rasch fitted(object, resp.patterns = NULL, type = c("expected", "marginal-probabilities", "conditional-probabilities"), …)

# S3 method for tpm fitted(object, resp.patterns = NULL, type = c("expected", "marginal-probabilities", "conditional-probabilities"), …)

Arguments

object

an object inheriting either from class gpcm, class grm, class ltm, class rasch, or class tpm.

resp.patterns

a matrix or a data.frame of response patterns with columns denoting the items; if NULL the expected frequencies are computed for the observed response patterns.

type

if type == "marginal-probabilities" the marginal probabilities for each response are computed; these are given by {i=1pPr(xi=1|z)xi×(1Pr(xi=1|z))1xi}p(z)dz, where xi denotes the ith item and z the latent variable. If type == "expected" the expected frequencies for each response are computed, which are the marginal probabilities times the number of sample units. If type == "conditional-probabilities" the conditional probabilities for each response and item are computed; these are Pr(xi=1|z^), where z^ is the ability estimate .

additional arguments; currently none is used.

Value

a numeric matrix or a list containing either the response patterns of interest with their expected frequencies or marginal probabilities, if type == "expected" || "marginal-probabilities" or the conditional probabilities for each response pattern and item, if type == "conditional-probabilities".

See Also

residuals.gpcm, residuals.grm, residuals.ltm, residuals.rasch, residuals.tpm

Examples

Run this code
# NOT RUN {
fit <- grm(Science[c(1,3,4,7)])
fitted(fit, resp.patterns = matrix(1:4, nr = 4, nc = 4))

fit <- rasch(LSAT)
fitted(fit, type = "conditional-probabilities")
# }

Run the code above in your browser using DataLab