tam.mml.3pl.Rd
This estimates a 3PL model with design matrices for item slopes and item intercepts. Discrete distributions of the latent variables are allowed which can be log-linearly smoothed.
tam.mml.3pl(resp, Y=NULL, group=NULL, formulaY=NULL, dataY=NULL, ndim=1,
pid=NULL, xsi.fixed=NULL, xsi.inits=NULL, xsi.prior=NULL,
beta.fixed=NULL, beta.inits=NULL, variance.fixed=NULL, variance.inits=NULL,
est.variance=TRUE, A=NULL, notA=FALSE, Q=NULL, Q.fixed=NULL, E=NULL,
gammaslope.des="2PL", gammaslope=NULL, gammaslope.fixed=NULL,
est.some.slopes=TRUE, gammaslope.max=9.99, gammaslope.constr.V=NULL,
gammaslope.constr.c=NULL, gammaslope.center.index=NULL, gammaslope.center.value=NULL,
gammaslope.prior=NULL, userfct.gammaslope=NULL, gammaslope.constr.Npars=0,
est.guess=NULL, guess=rep(0, ncol(resp)),
guess.prior=NULL, max.guess=0.5, skillspace="normal", theta.k=NULL,
delta.designmatrix=NULL, delta.fixed=NULL, delta.inits=NULL, pweights=NULL,
item.elim=TRUE, verbose=TRUE, control=list(), Edes=NULL )
# S3 method for tam.mml.3pl
summary(object,file=NULL,...)
# S3 method for tam.mml.3pl
print(x,...)
Data frame with polytomous item responses \(k=0,...,K\).
Missing responses must be declared as NA
.
A matrix of covariates in latent regression. Note that the intercept is automatically included as the first predictor.
An optional vector of group identifiers
An R formula for latent regression. Transformations of predictors
in \(Y\) (included in dataY
) can be easily specified,
e. g. female*race
or I(age^2)
.
An optional data frame with possible covariates \(Y\) in latent regression.
This data frame will be used if an R formula in formulaY
is specified.
Number of dimensions (is not needed to determined by the user)
An optional vector of person identifiers
A matrix with two columns for fixing \(\xi\) parameters. 1st column: index of \(\xi\) parameter, 2nd column: fixed value
A matrix with two columns (in the same way defined as in
xsi.fixed
with initial value for \(\xi\).
Item-specific prior distribution for \(\xi\) parameters. It is
assumed that \(\xi_k \sim N( \mu_k, \sigma_k^2 )\). The first column
in xsi.prior
is \(\mu_k\), the second is \(\sigma_k\).
A matrix with three columns for fixing regression coefficients.
1st column: Index of \(Y\) value, 2nd column: dimension,
3rd column: fixed \(\beta\) value.
If no constraints should be imposed on \(\beta\), then
set beta.fixed=FALSE
(see Example 2, Model 2_4
).
A matrix (same format as in beta.fixed
)
with initial \(\beta\) values
An optional matrix. In case of a single group it is a matrix with three columns for fixing entries in covariance matrix: 1st column: dimension 1, 2nd column: dimension 2, 3rd column: fixed value of covariance/variance. In case of multiple groups, it is a matrix with four columns 1st column: group index (from \(1,\ldots,G\), 2nd column: dimension 1, 3rd column: dimension 2, 4th column: fixed value of covariance
Initial covariance matrix in estimation. All matrix entries have to be
specified and this matrix is NOT in the same format like
variance.fixed
.
Should the covariance matrix be estimated? This argument
applies to estimated item slopes in tam.mml.2pl
.
The default is FALSE
which means that latent
variables (in the first group) are standardized in 2PL estimation.
An optional array of dimension \( I \times (K+1) \times N_\xi\). Only \(\xi\) parameters are estimated, entries in \(A\) only correspond to the design.
An optional logical indicating whether all entries in the \(A\) matrix are set to zero and no item intercept \(\xi\) should be estimated.
An optional \(I \times D\) matrix (the Q-matrix) which specifies the loading structure of items on dimensions.
Optional \(I \times D\) matrix of the same dimensions
like Q
. Non NA
entries contain values at which
item loadings should be fixed to.
Optional design array for item slopes \(\gamma\). It is a four dimensional array of size \(I \times (K+1) \times D \times N_\gamma\) containing items, categories, dimensions, \(\gamma\) parameter.
Optional string indicating type of item slope parameter to be estimated.
gammaslope.des="2PL"
estimates a slope parameter for an item,
gammaslope.des="2PLcat"
for an item and a
Initial or fixed vector of \(\gamma\) parameters
An optional matrix containing fixed values in the \(\gamma\) vector. First column: parameter index; second colunmn: fixed value.
An optional logical indicating whether some item slopes should be estimated.
Value for absolute entries in \(\gamma\) vector
An optional constraint matrix \(V\) for item slope parameters \(\gamma\)
An optional constraint vector \(c\) for item slope parameters \(\gamma\)
Indices of gammaslope
parameters which should be fixed to
sum specified in gammaslope.center.value
(see Example 7).
Specified values of sum of
subset of gammaslope
parameters.
Item-specific prior distribution for \(\gamma\) parameters. It is
assumed that \(\gamma_k \sim N( \mu_k, \sigma_k^2 )\). The first column
in gammaslope.prior
is \(\mu_k\), the second is \(\sigma_k\).
A user specified function for
constraints or transformations of the \(\gamma\) parameters
within the algorithm. See Example 17 in tam.mml
.
Number of constrained
\(\gamma\) parameters in userfct.gammaslope
An optional vector of integers indicating for which items a guessing parameter should be estimated. Same integers correspond to same estimated guessing parameters. A value of 0 denotes an item for which no guessing parameter is estimated.
Fixed or initial guessing parameters
Item-specific prior distribution for guessing parameters \(c_i\). It is
assumed that \(c_i \sim Beta(a_i, b_i)\). The first column
in gammaslope.prior
is \(a_i\), the second is \(b_i\).
Upper bound for guessing parameters
Skill space: normal distribution ("normal"
) or discrete
distribution ("discrete"
).
A matrix of the \(\bold{\theta}\) skill space in case of a discrete
distribution (skillspace="discrete"
).
A design matrix of the log-linear model for the skill space in case of a discrete
distribution (skillspace="discrete"
).
Fixed \(\delta\) values of the log-linear skill space.
delta.fixed
must be a matrix with three columns. First column:
\(\delta\) parameter index, Second column: Group index,
Third column: Fixed \(\delta\) parameter value.
Optional initial matrix of \(\delta\) parameters.
Optional vector of person weights.
Optional logical indicating whether an item with has
only zero entries should be removed from the analysis. The default
is TRUE
.
Logical indicating whether output should
be printed during iterations. This argument replaces control$progress
.
See tam.mml
for more details.
Compact form of design matrix. This argument is only defined for convenience for models with random starting values to avoid recalculations.
Object of class tam.mml.3pl
A file name in which the summary output will be written
Object of class tam.mml.3pl
Further arguments to be passed
The item response model for item \(i\) and category \(h\) and no guessing
parameters can be written as
$$ P( X_{i}=h | \bold{\theta} ) \propto \exp( \sum_d b_{ihd} \theta_d +
\sum_k a_{ih} \xi_k ) $$
For item slopes, a linear decomposition is allowed
$$ b_{ihd}=\sum_k e_{ihdk} \gamma_k $$
In case of a guessing parameter, the item response function is
$$ P( X_{i}=h | \bold{\theta} )=c_i + ( 1 - c_i ) \cdot
( 1 + \exp( - \sum_d b_{ihd} \theta_d - \sum_k a_{ih} \xi_k ) )^{-1}
$$
For possibilities of definitions of the design matrix \(E=(e_{ihdk})\)
see Formann (2007), for the strongly related linear logistic latent
class model see Formann (1992). Linear constraints on \(\gamma\)
can be specified by equations \(V \gamma=c\) and using the arguments
gammaslope.constr.V
and gammaslope.constr.c
.
Like in tam.mml
, a multivariate linear regression
$$ \bold{\theta}=Y \beta + \bold{\epsilon}$$
assuming a multivariate normal distribution on the residuals \(\bold{\epsilon}\)
can be specified (skillspace="normal"
).
Alternatively, a log-linear distribution of the skill classes \(P(\theta)\)
(skillspace="discrete"
)
is performed $$\log P(\theta )=D_{ \delta } \delta $$ See Xu and
von Davier (2008). The design matrix \(D_{\delta}\) can be specified in
delta.designmatrix
. The theta grid \(\bold{\theta}\) of the skill space
can be defined in theta.k
.
The same output as in tam.mml
and additional entries
Parameter vector \(\delta\)
Estimated \(\gamma\) item slope parameters
Standard errors \(\gamma\) item slope parameters
Used design matrix \(E\)
Used design matrix \(E\) in compact form
Estimated \(c\) guessing parameters
Standard errors \(c\) guessing parameters
Formann, A. K. (1992). Linear logistic latent class analysis for polytomous data. Journal of the American Statistical Association, 87, 476-486. doi:10.2307/2290280
Formann, A. K. (2007). (Almost) Equivalence between conditional and mixture maximum likelihood estimates for some models of the Rasch type. In M. von Davier & C. H. Carstensen (Eds.), Multivariate and mixture distribution Rasch models (pp. 177-189). New York: Springer. doi:10.1007/978-0-387-49839-3_11
Xu, X., & von Davier, M. (2008). Fitting the structured general diagnostic model to NAEP data. ETS Research Report ETS RR-08-27. Princeton, ETS. doi:10.1002/j.2333-8504.2008.tb02113.x
The implementation of the model builds on pieces work of Anton Formann. See http://www.antonformann.at/ for more information.