Learn R Programming

TAM (version 4.2-21)

tam.latreg: Latent Regression Model

Description

This function fits a latent regression model \(\bold{\theta}=\bold{Y} \bold{\beta} + \bold{\varepsilon}\). Only the individual likelihood evaluated at a \(\bold{\theta}\) grid is needed as the input. Like in tam.mml a multivariate normal distribution is posed on the residual distribution. Plausible values can be drawn by subsequent application of tam.pv (see Example 1).

Usage

tam.latreg(like, theta=NULL, Y=NULL, group=NULL, formulaY=NULL, dataY=NULL,
   beta.fixed=FALSE, beta.inits=NULL, variance.fixed=NULL,
   variance.inits=NULL, est.variance=TRUE, pweights=NULL, pid=NULL,
   userfct.variance=NULL, variance.Npars=NULL, verbose=TRUE, control=list())

# S3 method for tam.latreg summary(object,file=NULL,...)

# S3 method for tam.latreg print(x,...)

Value

Subset of values of tam.mml. In addition, means (M_post) and standard deviations (SD_post) are computed.

Arguments

like

Individual likelihood. This can be typically extracted from fitted item response models by making use of IRT.likelihood.

theta

Used \(\bold{\theta}\) grid in the fitted IRT model. If like is generated by the IRT.likelihood function, then theta is automatically extracted as an attribute.

Y

A matrix of covariates in latent regression. Note that the intercept is automatically included as the first predictor.

group

An optional vector of group identifiers

formulaY

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).

dataY

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.

beta.fixed

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) which is the default.

beta.inits

A matrix (same format as in beta.fixed) with initial \(\beta\) values

variance.fixed

An optional matrix with three columns for fixing entries in covariance matrix: 1st column: dimension 1, 2nd column: dimension 2, 3rd column: fixed value

variance.inits

Initial covariance matrix in estimation. All matrix entries have to be specified and this matrix is NOT in the same format like variance.inits.

est.variance

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.

pweights

An optional vector of person weights

pid

An optional vector of person identifiers

userfct.variance

Optional user customized function for variance specification (See Simulated Example 17).

variance.Npars

Number of estimated parameters of variance matrix if a userfct.variance is provided.

verbose

Optional logical indicating whether iteration should be displayed.

control

List of control parameters, see tam.mml fro details.

object

Object of class tam.latreg

file

A file name in which the summary output will be written

x

Object of class tam.latreg

...

Further arguments to be passed

See Also

See also tam.pv for plausible value imputation.