Fit Linear Logistic Models with Relaxed Assumptions (LLRA)

Description

Automatically builds design matrix and fits LLRA.

Usage

1
2
3
4
LLRA(X, W, mpoints, groups, baseline, itmgrps = NULL, ...)

## S3 method for class 'llra'
print(x, ...)

Arguments

X

Data matrix as described in Hatzinger and Rusch (2009). It must be of wide format, e.g. for each person all item answers are written in columns for t1, t2, t3 etc. Hence each row corresponds to all observations for a single person. See llraDat1 for an example. Missing values are not allowed.

W

Design Matrix for LLRA to be passed to LPCM. If missing, it is generated automatically.

mpoints

The number of time points.

groups

Vector, matrix or data frame with subject/treatment covariates.

baseline

An optional vector with the baseline values for the columns in group.

itmgrps

Specifies how many groups of items there are. Currently not functional but may be useful in the future.

x

For the print method, an object of class "llra".

...

Additional arguments to be passed to and from other methods.

Details

The function LLRA is a wrapper for LPCM to fit Linear Logistic Models with Relaxed Assumptions (LLRA). LLRA are extensions of the LPCM for the measurement of change over a number of discrete time points for a set of items. It can incorporate categorical covariate information. If no design matrix W is passed as an argument, it is built automatically from scratch.

Unless passed by the user, the baseline group is always the one with the lowest (alpha-)numerical value for argument groups. All other groups are labeled decreasingly according to the (alpha)-numerical value, e.g. with 2 treatment groups (TG1 and TG2) and one control group (CG), CG will be the baseline than TG1 and TG2. Hence the group effects are ordered like rev((unique(names(groupvec))) for naming.

Caution is advised as LLRA will fail if all changes for a group will be into a single direction (e.g. all subjects in the treatment group show improvement). Currently only data matrices are supported as arguments.

Value

Returns an object of class 'llra' (also inheriting from class 'eRm') containing

loglik

Conditional log-likelihood.

iter

Number of iterations.

npar

Number of parameters.

convergence

See code output in nlm.

etapar

Estimated basic item parameters. These are the LLRA effect parameters.

se.eta

Standard errors of the estimated basic item parameters.

betapar

Estimated item (easiness) parameters of the virtual items (not useful for interpretation here).

se.beta

Standard errors of virtual item parameters (not useful for interpretation here).

hessian

Hessian matrix if se = TRUE.

W

Design matrix.

X

Data matrix in long format. The columns correspond to the measurement points and each persons item answers are listed susequently in rows.

X01

Dichotomized data matrix.

groupvec

Assignment vector.

call

The matched call.

itms

The number of items.

Warning

A warning is printed that the first two categories for polytomous items are equated to save parameters. See Hatzinger and Rusch (2009) for a justification why this is valid also from a substantive point of view.

Author(s)

Thomas Rusch

References

Fischer, G.H. (1995) Linear logistic models for change. In G.H. Fischer and I. W. Molenaar (eds.), Rasch models: Foundations, recent developments and applications (pp. 157–181), New York: Springer.

Glueck, J. and Spiel, C. (1997) Item response models for repeated measures designs: Application and limitations of four different approaches. Methods of Psychological Research, 2. http://www.dgps.de/fachgruppen/methoden/mpr-online/issue2/art6/article.html

Hatzinger, R. and Rusch, T. (2009) IRT models with relaxed assumptions in eRm: A manual-like instruction. Psychology Science Quarterly, 51, pp. 87–120, http://erm.r-forge.r-project.org/psq_1_2009_06_87-120.pdf

See Also

The function to build the design matrix build_W, and the S3 methods summary.llra and plotTR and plotGR for plotting.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
##Example 6 from Hatzinger & Rusch (2009)
groups <- c(rep("TG",30),rep("CG",30))
llra1 <- LLRA(llradat3,mpoints=2,groups=groups)
llra1

## Not run: 
##An LLRA with 2 treatment groups and 1 baseline group, 5 items and 4
##time points. Item 1 is dichotomous, all others have 3, 4, 5, 6
##categories respectively.
dats <- llraDat2[1:20]
groups <- llraDat2$group
tps <- 4

#baseline CG
ex2 <- LLRA(dats,mpoints=tps,groups=groups) 

#baseline TG1
ex2a <- LLRA(dats,mpoints=tps,groups=groups,baseline="TG1") 

#summarize results
summary(ex2)
summary(ex2a)

#plotting
plotGR(ex2)
plotTR(ex2)
## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.