mml: Marginal Maximum Likelihood Estimation for Population...

Description Usage Arguments Details Value Author(s) Examples

View source: R/mml.R

Description

MML is used to estimate the population parameters (i.e., mean and variance) for an IRT model. Here, we treat item parameters as known and maximize the marginal distribution to obtain parameter estimates for the (normal) population distribution

Usage

1
2
3
4
5
mml(...)
## Default S3 method:
mml(data, Q = 20, params, ...)
## S3 method for class 'formula'
mml(formula, data, na.action, subset, Q = 20, params, ...)

Arguments

formula

an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted. The details of model specification are given under Details.

data

an optional data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model. If not found in data, the variables are taken from environment(formula), typically the environment from which mml is called.

params

item parameters organized as a list of lists. For more info see the irt.ability function help page.

na.action

a function which indicates what should happen when the data contain NAs. Defaults to getOption("na.action").

subset

an optional vector specifying a subset of observations to be used.

Q

Number of quadrature points used for Gauss-Hermite quadrature

...

A list of control parameters,

D

a constant usually fixed at 1.7 to bring the logistic function into coincidence with the probit.

startVal

Optional starting values to use for parameters.

Details

Models for mml are specified symbolically. A typical model has the form ~item1 + item2 where the terms to the right of the ~ are the columns of the data matrix containing the binary item responses.

Value

A list with class "mml" containing the following components:

Estimate

the estimates of the population parameters

Std.Error

the standard error of the parameters

Author(s)

Harold Doran

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
N <- 5
aa <- simRasch(200,N, mu=0, sigma=1)
tmp <- aa$data
b <- aa$gen
params <- list("3pl" = list(a = rep(1,N), b = b, c = rep(0,N)), "gpcm" = NULL)
colnames(tmp) <- paste('item', 1:5, sep='')


## Formula interface
fm1 <- mml(~ item1 + item2 + item3 + item4 + item5, data = tmp, params = params, control=list(D=1, startVal=c(0,1)))
summary(fm1)
coef(fm1)

## Default interface
fm1 <- mml(tmp, params = params, control=list(D=1, startVal=c(0,1)))
summary(fm1)

wasabi1989/MiscPsycho documentation built on Jan. 19, 2020, 12:29 a.m.