Package 'MLCIRTwithin'

Title: Latent Class Item Response Theory (LC-IRT) Models under Within-Item Multidimensionality
Description: Framework for the Item Response Theory analysis of dichotomous and ordinal polytomous outcomes under the assumption of within-item multidimensionality and discreteness of the latent traits. The fitting algorithms allow for missing responses and for different item parametrizations and are based on the Expectation-Maximization paradigm. Individual covariates affecting the class weights may be included in the new version together with possibility of constraints on all model parameters.
Authors: Francesco Bartolucci, Silvia Bacci - University of Perugia (IT)
Maintainer: Francesco Bartolucci <[email protected]>
License: GPL (>= 2)
Version: 2.1.1
Built: 2024-12-04 07:06:27 UTC
Source: CRAN

Help Index


Latent Class Item Response Theory (LC-IRT) Models under Within-Item Multidimensionality

Description

This package provides a flexible framework for the estimation of discrete two-tier Item Response Theory (IRT) models for the analysis of dichotomous and ordinal polytomous item responses. The class of models at issue is based on the assumption that one or more items are shared by (at most) two latent traits (i.e., within-item multidimensionality) and on the discreteness of latent traits (abilities). Every level of the abilities identify a latent class of subjects. The fitting algorithms are based on the Expectation-Maximization (EM) paradigm and allow for missing responses and for different item parametrizations. The package also allows for the inclusion of individual covariates affecting the class weights together with possibility of constraints on all model parameters.

Details

Package: MultiLCIRT
Type: Package
Version: 2.1.1
Date: 2019-09-30
License: GPL (>= 2)

Function est_multi_poly_within performs the parameter estimation of the same model considered in the R package MultiLCIRT when one or more items are shared by two latent traits (within-item multidimensionality); in addition, fixed values and constraints on support points and item parameters are allowed.

Author(s)

Francesco Bartolucci, Silvia Bacci - University of Perugia (IT)

Maintainer: Francesco Bartolucci <[email protected]>

References

Adams, R., Wilson, M., and Wang, W. (1997), The multidimensional random coefficients multinomial logit, Applied Psychological Measurement, 21, 1-24.

Bacci, S. and Bartolucci, F. (2015), A multidimensional finite mixture SEM for non-ignorable missing responses to test items, Structural Equation Modeling, 22, 352-365.

Bacci, S., Bartolucci, F., and Gnaldi, M. (2014), A class of Multidimensional Latent Class IRT models for ordinal polytomous item responses, Communications in Statistics - Theory and Methods, 43, 787-800.

Bartolucci, F. (2007), A class of multidimensional IRT models for testing unidimensionality and clustering items, Psychometrika, 72, 141-157.

Bartolucci, F., Bacci, S., and Gnaldi, M. (2015), Statistical Analysis of Questionnaires: A Unified Approach Based on R and Stata, Chapman and Hall/CRC press.

Bartolucci, F., Bacci, S., and Gnaldi, M. (2014), MultiLCIRT: An R package for multidimensional latent class item response models, Computational Statistics and Data Analysis, 71, 971-985.

Bock, R.D., Gibbons, R., and Muraki, E. (1988), Full-information item factor analysis, Applied Psychological Measurement, 12, 261-280.

Bonifay, W. E. (2015), An illustration of the two-tier item factor analysis model, in S. P. Reise and D. A. Revicki (eds), Handbook of Item Response Theory Modeling, p. 207-225, Routledge.

Cai, L. (2010), A two-tier full-information item factor analysis model with applications, Psychometrika, 75, 581-612.

Cai, L., Yang, J. S., and Hansen, M. (2011), Generalized full-information item bifactor analysis, Psychological Methods, 16, 221-248.

Gibbons, R. D., Darrell, R. B., Hedeker, D., Weiss, D. J., Segawa, E., Bhaumik, D. K., and Stover, A. (2007), Full-information item bifactor analysis of graded response data, Applied Psychological Measurement, 31, 4-19.

Gibbons, R. D. and Hedeker, D. R. (1992), Full-information item bi-factor analysis, Psychometrika, 57, 423-436.

Examples

## Not run: 
# Estimation of a two-tier LC-IRT model 
data(SF12_nomiss)
S = SF12_nomiss[,1:12]
X = SF12_nomiss[,13]
# Define matrices to allocate each item on the latent variables  
multi1=rbind(1:6, 7:12)
multi2=rbind(4:8, c(2:3, 10:12))
# Graded response model with two primary latent variables, each of them
# having two dimensions (free discrimination and difficulty parameters;
# two latent classes for both the latent variables; one covariate):
tol = 10^-6 # decrease the tolerance to obtain more reliable results
out1 = est_multi_poly_within(S=S,k1=2,k2=2,X=X,link="global",disc=TRUE,
                             multi1=multi1,multi2=multi2,tol=tol,
                             disp=TRUE,out_se=FALSE) 
# Display output
summary(out1)

## End(Not run)

Build block diagonal matrices

Description

Function that given two matrices builds the corresponding block diagonal matrix.

Usage

blkdiag(A, B)

Arguments

A

first matrix to be included

B

second matrix to be included

Value

C

resulting block diagonal matrix

Author(s)

Francesco Bartolucci - University of Perugia (IT)


Display the estimated model parameters of est_multi_poly_between object

Description

Given the output from est_multi_poly_between, estimated abilities, item parameters, and regression coefficients are displayed

Usage

## S3 method for class 'est_multi_poly_between'
coef(object, ...)

Arguments

object

output from est_multi_poly_between

...

further arguments passed to or from other methods

Author(s)

Francesco Bartolucci - University of Perugia (IT)


Display the estimated model parameters of est_multi_poly_within object

Description

Given the output from est_multi_poly_within, estimated abilities, item parameters, and regression coefficients are displayed for the 1st and the 2nd latent variable

Usage

## S3 method for class 'est_multi_poly_within'
coef(object, ...)

Arguments

object

output from est_multi_poly_within

...

further arguments passed to or from other methods

Author(s)

Francesco Bartolucci - University of Perugia (IT)


Display the estimated confidence intervals of the model parameters of est_multi_poly_between object

Description

Given the output from est_multi_poly_between, the inferior and superior limits of confidence intervals at a given level are displayed for abilities, item parameters, and regression coefficients

Usage

## S3 method for class 'est_multi_poly_between'
confint(object, parm, level=0.95, ...)

Arguments

object

output from est_multi_poly_between

parm

empity object

level

confidence level

...

further arguments passed to or from other methods

Author(s)

Francesco Bartolucci - University of Perugia (IT)


Display the estimated confidence intervals of the model parameters of est_multi_poly_within object

Description

Given the output from est_multi_poly_within, the inferior and superior limits of confidence intervals at a given level are displayed for abilities, item parameters, and regression coefficients for the 1st and the 2nd latent variable

Usage

## S3 method for class 'est_multi_poly_within'
confint(object, parm, level=0.95, ...)

Arguments

object

output from est_multi_poly_within

parm

empity object

level

confidence level

...

further arguments passed to or from other methods

Author(s)

Francesco Bartolucci - University of Perugia (IT)


Fit marginal regression models for categorical responses

Description

It estimates marginal regression models to datasets consisting of a categorical response and one or more covariates by a Fisher-scoring algorithm; this is an internal function that also works with response variables having a different number of response categories.

Usage

est_multi_glob_genZ(Y, X, model = c("m","l","g"), ind = 1:nrow(Y), de = NULL,
                    Z = NULL, z = NULL, Dis = NULL, dis = NULL, disp=FALSE,
                    only_sc = FALSE, Int = NULL, der_single = FALSE, maxit = 10)

Arguments

Y

matrix of response configurations

X

array of all distinct covariate configurations

model

type of logit (m = multinomial, l = local, g = global)

ind

vector to link responses to covariates

de

initial vector of regression coefficients

Z

design matrix

z

intercept associated with the design matrix

Dis

matrix for inequality constraints on de

dis

vector for inequality constraints on de

disp

to display partial output

only_sc

to exit giving only the score

Int

matrix of the fixed intercepts

der_single

to require single derivatives

maxit

maximum number of iterations

Value

be

estimated vector of regression coefficients

lk

log-likelihood at convergence

Pdis

matrix of the probabilities for each distinct covariate configuration

P

matrix of the probabilities for each covariate configuration

sc

score for the vector of regression coefficients

FI

Fisher information matrix

de

estimated vector of (free) regression coefficients

scde

score for the vector of (free) regression coefficients

FIde

Fisher information matrix for the vector of (free) regression coefficients

Sc

matrix of individual scores for the vector of regression coefficients (if der_single=TRUE)

Scde

matrix of individual scores for the vector of (free) regression coefficients (if der_single=TRUE)

Author(s)

Francesco Bartolucci - University of Perugia (IT)

References

Colombi, R. and Forcina, A. (2001), Marginal regression models for the analysis of positive association of ordinal response variables, Biometrika, 88, 1007-1019.

Glonek, G. F. V. and McCullagh, P. (1995), Multivariate logistic models, Journal of the Royal Statistical Society, Series B, 57, 533-546.


Estimate latent class item response theory (LC-IRT) models for dichotomous and polytomous responses under between-item multidimensionality

Description

The function performs maximum likelihood estimation of the parameters of the IRT models assuming a discrete distribution for the ability and between-item multidimensionality. Every ability level corresponds to a latent class of subjects in the reference population. The class of models is based on a between-item multidimensional formulation with each item loading on a dimension of a given latent variable. Maximum likelihood estimation is based on Expectation- Maximization algorithm.

Usage

est_multi_poly_between(S, yv = rep(1, ns), k, X = NULL, start = c("deterministic",
                       "random","external"), link = c("global","local"), disc = FALSE,
                       difl = FALSE, multi = 1:J, Phi = NULL, gat = NULL, De = NULL,
                       fort = FALSE, tol = 10^-10, maxitc = 10^4, disp = FALSE,
                       output = FALSE, out_se = FALSE, glob = FALSE, Zth=NULL,zth=NULL,
                       Zbe=NULL, zbe=NULL,Zga=NULL,zga=NULL)

Arguments

S

matrix of all response sequences observed at least once in the sample and listed row-by-row (use NA for missing responses)

yv

vector of the frequencies of every response configuration in S

k

number of ability levels (or latent classes) for the latent variable

X

matrix of covariates that affects the weights

start

method of initialization of the algorithm

link

type of link function ("global" for global logits, "local" for local logits); with global logits a graded response model results; with local logits a partial credit model results (with dichotomous responses, global logits is the same as using local logits resulting in the Rasch or the 2PL model depending on the value assigned to disc)

disc

indicator of constraints on the discriminating indices (FALSE = all equal to one, TRUE = free)

difl

indicator of constraints on the difficulty levels (FALSE = free, TRUE = rating scale parametrization); difl = TRUE is only admitted in the presence of items with the same number of categories

multi

matrix with a number of rows equal to the number of dimensions and elements in each row equal to the indices of the items measuring the dimension corresponding to that row for the latent variable

Phi

initial value of the matrix of the conditional response probabilities (if start="external")

gat

initial value of the vector of free discriminating indices (if start="external")

De

initial value of regression coefficients for the covariates (if start="external")

fort

to use Fortran routines when possible

tol

tolerance level for checking convergence of the algorithm as relative difference between consecutive log-likelihoods

maxitc

maximum number of iterations of the algorithm

disp

to display the likelihood evolution step by step

output

to return additional outputs (Piv,Pp,lkv, Xlabel, XXdis)

out_se

to return standard errors

glob

to use global logits in the covariates

Zth

matrix for the specification of constraints on the support points

zth

vector for the specification of constraints on the support points

Zbe

matrix for the specification of constraints on the item difficulty parameters

zbe

vector for the specification of constraints on the item difficulty parameters

Zga

matrix for the specification of constraints on the item discriminating indices

zga

vector for the specification of constraints on the item discriminating indices

Value

piv

estimated vector of weights of the latent classes (average of the weights in case of model with covariates)

fv

vector indicating the reference item chosen for each latent dimension of the latent variable

tht

estimated matrix of free ability levels for each dimension

Th

complete matrix of free and constrained ability levels for each dimension and latent class of the latent variable

bet

estimated vector of free difficulty levels for every item (split in two vectors if difl=TRUE)

Bec

complete vector of free and constrained difficulty levels for every item (split in two vectors if difl=TRUE)

gat

estimated vector of free discriminating indices for every item (with all elements equal to 1 if disc=FALSE)

gac

complete vector of free and constrained discriminating indices for every item (with all elements equal to 1 if disc=FALSE)

De

matrix of regression coefficients for the multinomial (or global if glob=TRUE) logit model on the class weights

Phi

array of the conditional response probabilities for every item and each of the k latent classes

lk

log-likelhood at convergence of the EM algorithm

np

number of free parameters

aic

Akaike Information Criterion index

bic

Bayesian Information Criterion index

ent

entropy index to measure the separation of classes

pivs

estimated vector of (ordered) weights of the latent classes (average of the weights in case of model with covariates)

Ths

standardized ability levels

Becs

standardized values of item difficulty parameters

gacs

standardized values of item discriminating indices

call

call of function

Pp

matrix of the posterior probabilities for each response configuration and latent class (if output=TRUE)

lkv

vector to trace the log-likelihood evolution across iterations (if output=TRUE)

Xlabel

structure of the design matrix, for internal use (if output=TRUE)

XXdis

design matrix for the covariates affecting the latent variable (if output=TRUE)

Piv

matrix of the weights for every response configuration (if output=TRUE)

setht

standard errors for vector tht (if out_se=TRUE)

seTh

standard errors for vector Th (if out_se=TRUE)

sebet

standard errors for vector bet (if out_se=TRUE)

seBec

standard errors for vector Bec (if out_se=TRUE)

segat

standard errors for vector gat (if out_se=TRUE)

segac

standard errors for vector gac (if out_se=TRUE)

seDe

standard errors for vector De (if out_se=TRUE)

Vnt

estimated variance-covariance matrix for free parameter estimates (if out_se=TRUE)

Vn

estimated variance-covariance matrix for all parameter estimates (if out_se=TRUE)

Author(s)

Francesco Bartolucci, Silvia Bacci - University of Perugia (IT)

References

Bartolucci, F. (2007), A class of multidimensional IRT models for testing unidimensionality and clustering items, Psychometrika, 72, 141-157.

Bacci, S., Bartolucci, F. and Gnaldi, M. (2014), A class of Multidimensional Latent Class IRT models for ordinal polytomous item responses, Communications in Statistics - Theory and Methods, 43, 787-800.

Examples

## Not run: 
# Fit a Graded response model with two dimensions (free discrimination
# and difficulty parameters; three latent classes):
data(SF12_nomiss)
S = SF12_nomiss[,1:12]
X = SF12_nomiss[,13]
multi0 = rbind(c(1:5, 8), c(6:7,9:12))
k=3

out1 =  est_multi_poly_between(S=S,k=k,X=X,link="global",disc=TRUE,
                               multi=multi0,fort=TRUE,disp=TRUE,out_se=TRUE) 

# Display output:
summary(out1)
out1$lk
out1$Th
out1$piv
out1$De

## End(Not run)

## Not run: 
## Fit the model under different external constraints on abilities and/or item parameters
# Fixed ability levels; all item parameters can be free  
S1 = pmin(as.matrix(S),2) # all items have the same number of categories
Zth = matrix(0,nrow(multi0)*k,0)
zth = c(rep(-1, times=nrow(multi0)), rep(0, times=nrow(multi0)),  rep(1, times=nrow(multi0)))
Zbe = diag(ncol(S1)*2)  # free item difficulties: 12*2  = 24 (12 items with 3 categories)
Zga = diag(ncol(S1));  # free item discriminating parameters = 12 items loading on U
outc1 = est_multi_poly_between(S=S1,k=k,X=X,link="global",disc=TRUE, multi=multi0,disp=TRUE,
                               out_se=TRUE,Zth=Zth,zth=zth,Zbe=Zbe,Zga=Zga) 
outc1$Th
outc1$tht
outc1$Bec                                                          

# Add equality constraints on item parameters                         
# Same difficulties for pairs of items 1-7, 2-8, 3-9, 4-10, 5-11, 6-12; 
# same discriminating indices for items 2 and 3;
# free ability levels
Zbe = (matrix(1,2,1)%x%diag(12))[,-1]
Zga = as.matrix(rep(0, times=12)); Zga[2,1] = 1; Zga[3,1] = 1; 
Zga1p1 = matrix(0, nrow=3, ncol=9); Zga1p2 = diag(9); Zga1p = rbind(Zga1p1, Zga1p2)
Zga = cbind(Zga, Zga1p)
# discriminating index of item 1 constrained to 1 for the model identifiability
zga = rep(0,nrow(Zga)); zga[1] = 1 
outc2 = est_multi_poly_between(S=S1,k=k,X=X,link="global",disc=TRUE, 
                             multi = multi0,disp=TRUE,tol=10^-4,
                             out_se=TRUE,Zbe=Zbe, Zga=Zga, zga=zga)
outc2$tht
outc2$Th
outc2$Ths
outc2$Bec
outc2$Becs
outc2$gac 
outc2$gacs

## End(Not run)

Estimate latent class item response theory (LC-IRT) models for dichotomous and polytomous responses under within-item multidimensionality

Description

The function performs maximum likelihood estimation of the parameters of the two-tier IRT models assuming a discrete distribution for the ability and within-item multidimensionality. Every ability level corresponds to a latent class of subjects in the reference population. The class of models is based on a particular within-item multidimensional formulation with each item loading on at most two uncorrelated latent variables. Maximum likelihood estimation is based on the Expectation- Maximization algorithm.

Usage

est_multi_poly_within(S, yv = rep(1, ns), k1, k2, X = NULL,
                      start = c("deterministic","random","external"), link = c("global",
                      "local"), disc = FALSE, difl = FALSE, multi1, multi2, Phi = NULL,
                      ga1t = NULL, ga2t = NULL, De1 = NULL, De2 = NULL, fort = FALSE,
                      tol = 10^-10, maxitc = 10^4, disp = FALSE, output = FALSE,
                      out_se = FALSE, glob = FALSE, Zth1 = NULL, zth1 = NULL, Zth2=NULL,
                      zth2=NULL, Zbe=NULL, zbe=NULL, Zga1=NULL, zga1=NULL, Zga2=NULL,
                      zga2=NULL)

Arguments

S

matrix of all response sequences observed at least once in the sample and listed row-by-row (use NA for missing responses)

yv

vector of the frequencies of every response configuration in S

k1

number of ability levels (or latent classes) for the 1st latent variable

k2

number of ability levels (or latent classes) for the 2nd latent variable

X

matrix of covariates that affects the weights

start

method of initialization of the algorithm

link

type of link function ("global" for global logits, "local" for local logits); with global logits a graded response model results; with local logits a partial credit model results (with dichotomous responses, global logits is the same as using local logits resulting in the Rasch or the 2PL model depending on the value assigned to disc)

disc

indicator of constraints on the discriminating indices (FALSE = all equal to one, TRUE = free)

difl

indicator of constraints on the difficulty levels (FALSE = free, TRUE = rating scale parametrization); difl = TRUE is only admitted in the presence of items with the same number of categories

multi1

matrix with a number of rows equal to the number of dimensions and elements in each row equal to the indices of the items measuring the dimension corresponding to that row for the 1st latent variable

multi2

matrix with a number of rows equal to the number of dimensions and elements in each row equal to the indices of the items measuring the dimension corresponding to that row for the 2nd latent variable

Phi

initial value of the matrix of the conditional response probabilities (if start="external")

ga1t

initial value of the vector of free discriminating indices (if start="external") for the 1st latent variable

ga2t

initial value of the vector of free discriminating indices (if start="external") for the 2nd latent variable

De1

initial value of regression coefficients for the covariates (if start="external") affecting the 1st latent variable

De2

initial value of regression coefficients for the covariates (if start="external") affecting the 2nd latent variable

fort

to use Fortran routines when possible

tol

tolerance level for checking convergence of the algorithm as relative difference between consecutive log-likelihoods

maxitc

maximum number of iterations of the algorithm

disp

to display the likelihood evolution step by step

output

to return additional outputs (Piv1, Piv2, Pp1, Pp2, lkv, Xlabel, XX1dis, XX2dis)

out_se

to return standard errors

glob

to use global logits in the covariates

Zth1

matrix for the specification of constraints on the support points for the 1st latent variable

zth1

vector for the specification of constraints on the support points for the 1st latent variable

Zth2

matrix for the specification of constraints on the support points for the 2nd latent variable

zth2

vector for the specification of constraints on the support points for the 2nd latent variable

Zbe

matrix for the specification of constraints on the item difficulty parameters

zbe

vector for the specification of constraints on the item difficulty parameters

Zga1

matrix for the specification of constraints on the item discriminating indices for the 1st latent variable

zga1

vector for the specification of constraints on the item discriminating indices for the 1st latent variable

Zga2

matrix for the specification of constraints on the item discriminating indices for the 2nd latent variable

zga2

vector for the specification of constraints on the item discriminating indices for the 2nd latent variable

Details

In order to ensure the model identifiability, the following conditions must hold. First, suitable constraints on the item parameters are required: one discriminanting index must be equal to 1 and one difficulty parameter must be equal to 0 for each dimension. The constrained items may be chosen in an arbitrary way: by default the algorithm selects the first element of each row of multi1 and multi2. As a consequence, the user must pay attention to specify matrices multi1 and multi2 so that different items are constrained for each dimension. Second, the maximum number of items shared by the two latent variables is equal to the total number of items minus one, that is, the union of rows of multi1 must differ from the union of rows of multi2. These conditions may be skipped specifying in a suitable way the entries of Zth1, zth1, Zth2, zth2, Zbe, zbe, Zga1, zga1, Zga2, and zga2, according to the following equations:

Th1 = Zth1 %*% th1t + zth1

Th2 = Zth2 %*% th2t + zth2

Bec = Zbe %*% bet + zbe

ga1c = Zga1 %*% ga1t + zga1

ga2c = Zga2 %*% ga2t + zga2,

where Th1, Th2, Bec, ga1c, ga2c denote the complete matrices/vectors of support points (Th1, Th2), item difficulties (Bec), and item discriminating indices (ga1c, ga2c), whereas th1t, th2t, bet, ga1t, ga2t are the corresponding matrices/vectors of free (i.e., unconstrained) parameters.

Value

piv1

estimated vector of weights of the latent classes (average of the weights in case of model with covariates) for the 1st latent variable

piv2

estimated vector of weights of the latent classes (average of the weights in case of model with covariates) for the 2nd latent variable

fv1

vector indicating the reference item chosen for each latent dimension for the 1st latent variable

fv2

vector indicating the reference item chosen for each latent dimension for the 2nd latent variable

th1t

estimated matrix of free ability levels for each dimension and for the 1st latent variable

th2t

estimated matrix of free ability levels for each dimension and for the 2nd latent variable

Th1

complete matrix of free and constrained ability levels for each dimension and latent class for the 1st latent variable

Th2

complete matrix of free and constrained ability levels for each dimension and latent class for the 2nd latent variable

bet

estimated vector of free difficulty levels for every item (split in two vectors if difl=TRUE)

Bec

complete vector of free and constrained difficulty levels for every item (split in two vectors if difl=TRUE)

ga1t

estimated vector of free discriminating indices for every item (with all elements equal to 1 if disc=FALSE) for the 1st latent variable

ga2t

estimated vector of free discriminating indices for every item (with all elements equal to 1 if disc=FALSE) for the 2nd latent variable

ga1c

complete vector of free and constrained discriminating indices for every item for the 1st latent variable (with all elements equal to 1 if disc=FALSE and NA for items that do not load on the 1st latent variable)

ga2c

complete vector of free and constrained discriminating indices for every item for the 2nd latent variable (with all elements equal to 1 if disc=FALSE and NA for items that do not load on the 2nd latent variable)

De1

matrix of regression coefficients for the multinomial (or global if glob=TRUE) logit model on the class weights for the 1st latent variable

De2

matrix of regression coefficients for the multinomial (or global if glob=TRUE) logit model on the class weights for the 2nd latent variable

Phi

array of the conditional response probabilities for every item and each of the k1*k2 latent classes

lk

log-likelihood at convergence of the EM algorithm

np

number of free parameters

aic

Akaike Information Criterion index

bic

Bayesian Information Criterion index

ent

entropy index to measure the separation of classes

piv1s

estimated vector of (ordered) weights of the latent classes (average of the weights in case of model with covariates) for the 1st standardized latent variable

piv2s

estimated vector of (ordered) weights of the latent classes (average of the weights in case of model with covariates) for the 2nd standardized latent variable

Th1s

standardized ability levels for the 1st latent variable, ordered according to the first dimension

Th2s

standardized ability levels for the 2nd latent variable, ordered according to the first dimension

Becs

standardized values of item difficulty parameters

ga1cs

standardized values of item discriminating indices for the 1st latent variable

ga2cs

standardized values of item discriminating indices for the 2nd latent variable

call

call of function

Pp1

matrix of the posterior probabilities for each response configuration and latent class for the 1st latent variable (if output=TRUE)

Pp2

matrix of the posterior probabilities for each response configuration and latent class for the 2nd latent variable (if output=TRUE)

lkv

vector to trace the log-likelihood evolution across iterations (if output=TRUE)

Xlabel

structure of the design matrix, for internal use (if output=TRUE)

XX1dis

design matrix for the covariates affecting the 1st latent variable (if output=TRUE)

XX2dis

design matrix for the covariates affecting the 2nd latent variable (if output=TRUE)

Piv1

matrix of the weights for every covariate pattern configuration for the 1st latent variable (if output=TRUE)

Piv2

matrix of the weights for every covariate pattern configuration for the 2nd latent variable (if output=TRUE)

seth1t

standard errors for vector th1t (if out_se=TRUE)

seth2t

standard errors for vector th2t (if out_se=TRUE)

seTh1

standard errors for vector Th1 (if out_se=TRUE)

seTh2

standard errors for vector Th2 (if out_se=TRUE)

sebet

standard errors for vector bet (if out_se=TRUE)

seBec

standard errors for vector Bec (if out_se=TRUE)

sega1t

standard errors for vector ga1t (if out_se=TRUE)

sega2t

standard errors for vector ga2t (if out_se=TRUE)

sega1c

standard errors for vector ga1c (if out_se=TRUE)

sega2c

standard errors for vector ga2c (if out_se=TRUE)

seDe1

standard errors for vector De1 (if out_se=TRUE)

seDe2

standard errors for vector De2 (if out_se=TRUE)

Vnt

estimated variance-covariance matrix for free parameters (if out_se=TRUE)

Vn

complete variance-covariance matrix for all parameters (if out_se=TRUE)

Author(s)

Francesco Bartolucci, Silvia Bacci - University of Perugia (IT)

References

Bacci, S. and Bartolucci, F. (2015), A multidimensional finite mixture SEM for non-ignorable missing responses to test items, Structural Equation Modeling, 22, 352-365.

Bacci, S., Bartolucci, F., and Gnaldi, M. (2014), A class of Multidimensional Latent Class IRT models for ordinal polytomous item responses, Communications in Statistics - Theory and Methods, 43, 787-800.

Bartolucci, F. (2007), A class of multidimensional IRT models for testing unidimensionality and clustering items, Psychometrika, 72, 141-157.

Bonifay, W. E. (2015), An illustration of the two-tier item factor analysis model, in S. P. Reise and D. A. Revicki (eds), Handbook of Item Response Theory Modeling, p. 207-225, Routledge.

Cai, L. (2010), A two-tier full-information item factor analysis model with applications, Psychometrika, 75, 581-612.

Cai, L., Yang, J. S., and Hansen, M. (2011), Generalized full-information item bifactor analysis, Psychological Methods, 16, 221-248.

Examples

## Not run: 
# Fit the model under different within-item multidimensional structures
# for SF12_nomiss data
data(SF12_nomiss)
S = SF12_nomiss[,1:12]
X = SF12_nomiss[,13]

# Graded response model with two latent variables sharing six items (free
# discrimination and difficulty parameters; two latent classes for each
# latent variable; one covariate):
multi1 = c(1:5, 8:12)
multi2 = c(6:12, 1)
tol = 10^-6  # decrease tolerance to obtain more reliable results
out1 = est_multi_poly_within(S=S,k1=2,k2=2,X=X,link="global",disc=TRUE,
                             multi1=multi1,multi2=multi2,disp=TRUE,
                             out_se=TRUE,tol=tol) 
                             
# Partial credit model with two latent variables sharing eleven items
# (free discrimination and difficulty parameters; two latent classes for
# the 1st latent variable and three latent classes for the 2nd latent
# variable; one covariate):
multi1 = 1:12
multi2 = 2:12
out2 = est_multi_poly_within(S=S,k1=2,k2=3,X=X,link="local",disc=TRUE,
                             multi1=multi1,multi2=multi2,disp=TRUE,tol=tol)
                               
# Display output:
summary(out2)
out2$lk
out2$Th1 
out2$Th1s
out2$piv1
out2$Th2
out2$Th2s
out2$piv2
out2$De1
out2$De2

## End(Not run)

## Not run: 
## Fit the model under different situations for RLMS data
# Example of use of the function to account for non-ignorable missing
# item responses 
data(RLMS)
X = RLMS[,1:4]
Y = RLMS[,6:9]
YR = cbind(Y,1*(!is.na(Y)))
multi1 = 1:4
multi2 = 5:8
tol = 10^-6  # decrease tolerance to obtain more reliable results

# MAR model
out0 = est_multi_poly_within(YR,k1=3,k2=2,X=X,link="global",
                 disc=TRUE,multi1=multi1,multi2=multi2,disp=TRUE,
                 out_se=TRUE,glob=TRUE,tol=tol) 
                 
# NMAR model
multi1 = 1:8
out1 = est_multi_poly_within(YR,k1=3,k2=2,X=X,link="global",
                 disc=TRUE,multi1=multi1,multi2=multi2,disp=TRUE,
                 out_se=TRUE,glob=TRUE,tol=tol)
                   
# testing effect of the latent trait on missingness
c(out0$bic,out1$bic)
(test1 = out1$ga1c[-1]/out1$sega1c[-1])

## End(Not run)

## Not run: 
## Fit the model under different external constraints on abilities and/or item parameters
data(SF12_nomiss)
S = SF12_nomiss[,1:12]
X = SF12_nomiss[,13]
multi1m = rbind(1:5, 8:12) # two dimensions for the 1st latent variable 
multi2m = rbind(6:9, c(10:12, 1)) # two dimensions for the 2nd latent variable 
k1 = 2
k2 = 2

# Fixed ability levels; all item parameters can be free
Zth1 = matrix(0,nrow(multi1m)*k1,0)
zth1 = c(rep(-1, times=nrow(multi1m)),  rep(1, times=nrow(multi1m)))
Zth2 = matrix(0,nrow(multi2m)*k2,0)
zth2 = c(rep(-1, times=nrow(multi2m)),  rep(1, times=nrow(multi2m)))  
# item difficulties: 10*4 + 2*2 = 44 (10 items with 5 categories plus 2 items with 3 categories)
Zbe = diag(44)
# item discriminating parameters = 10 items loading on the 1st latent variable plus 8 items loading
# on the 2nd latent variable
Zga1 = diag(10); Zga2 = diag(8) 
zga1 = rep(0,nrow(Zga1)); zga1[1] = 1
zga2 = rep(0,nrow(Zga2)); zga2[1] = 1
out1c = est_multi_poly_within(S=S,k1=k1,k2=k2,X=X,link="global",disc=TRUE,multi1=multi1m,
                              multi2=multi2m,disp=TRUE,out_se=TRUE,Zth1=Zth1,zth1=zth1,Zth2=Zth2,
                              zth2=zth2,Zbe=Zbe,Zga1=Zga1,zga1=zga1,Zga2=Zga2,zga2=zga2)   
summary(out1c)
out1c$Bec                             

# Constraint difficulties of the first threshold to be equal for all items 
# and difficulties of the second threshold to be equal for all items; 
# free ability levels
multi1u = c(1:3, 6:10) # one dimension for the 1st latent variable 
multi2u = c(4:10, 1)  # one dimension for the 2nd latent variable
S1 = pmin(as.matrix(S[, -c(2,3)]),2)  # all items have the same number of categories
Zbe = as.matrix((matrix(1,10,1)%x%diag(2))[,-1])  
out2c = est_multi_poly_within(S=S1,k1=2,k2=2,X=X,link="global",disc=TRUE,
                             multi1=multi1u,multi2=multi2u,disp=TRUE,
                             out_se=TRUE,Zbe=Zbe)
out2c$Bec   

# Same difficulties for pairs of items 1-6, 2-7, 3-8, 4-9, 5-10; 
# free ability levels
Zbe = (matrix(1,2,1)%x%diag(10))[,-1]
out3c = est_multi_poly_within(S=S1,k1=2,k2=2,X=X,link="global",disc=TRUE,
                             multi1=multi1u,multi2=multi2u,disp=TRUE,
                             out_se=TRUE,Zbe=Zbe)
out3c$Bec  

# Add equality constraints on some discriminating indices for the 1st latent variable
Zbe = (matrix(1,2,1)%x%diag(10))[,-1]
Zga1 = diag(length(multi1u)); 
# discriminating index of item 1 constrained to 1 for the model identifiability
# discriminating index of item 3 equal to discriminating index of item 2
Zga1 = Zga1[, -c(1, 3)];
Zga1[3, 1] = 1 
zga1 = rep(0,nrow(Zga1)); zga1[1] = 1
out4c = est_multi_poly_within(S=S1,k1=2,k2=2,X=X,link="global",disc=TRUE,
                             multi1=multi1u,multi2=multi2u,disp=TRUE,tol=10^-4,
                             out_se=TRUE,Zbe=Zbe, Zga1=Zga1, zga1=zga1)   
out4c$Bec 
out4c$ga1c
out4c$ga1t                                                           

## End(Not run)

Compute observed log-likelihood and score

Description

Function used within est_multi_poly_between to compute observed log-likelihood and score.

Usage

lk_obs_score_between(part_comp, lde, lpart, lgat, S, R, yv, k, rm, lv,
                     J, fv, disc, glob, refitem, miss,
                     ltype, XXdis, Xlabel, ZZ0,fort, Zpar, zpar, Zga, zga, items)

Arguments

part_comp

complete vector of parameters

lde

length of de

lpart

length of part

lgat

length of gat

S

matrix of responses

R

matrix of observed responses indicator

yv

vector of frequencies

k

number of latent classes for the latent variable

rm

number of dimensions for the latent variable

lv

number of response categories for each item

J

number of items

fv

indicator of constrained parameters

disc

presence of discrimination parameters

glob

indicator of global parametrization for the covariates

refitem

vector of reference items

miss

indicator of presence of missing responses

ltype

type of logit

XXdis

array of covariates for the latent variable

Xlabel

indicator for covariate configuration

ZZ0

design matrix

fort

to use Fortran

Zpar

array for the specification of constraints on the support points of the latent variable and for the item difficulty parameters

zpar

vector for the specification of constraints on the support points of the latent variable and for the item difficulty parameters

Zga

matrix for the specification of constraints on the item discriminating indices

zga

vector for the specification of constraints on the item discriminating indices

items

items affected by the latent variable

Value

lk

log-likelihood function

sc

score vector

Author(s)

Francesco Bartolucci - University of Perugia (IT)


Compute observed log-likelihood and score

Description

Function used within est_multi_poly_within to compute observed log-likelihood and score.

Usage

lk_obs_score_within(part_comp, lde1, lde2, lpart, lga1t, lga2t, S, R, yv, k1, k2, 
                    rm1, rm2, lv, J, fv, disc, glob, refitem, miss, ltype, XX1dis, XX2dis,
                    Xlabel, ZZ0, fort, Zpar, zpar, Zga1, zga1, Zga2, zga2, items1, items2)

Arguments

part_comp

complete vector of parameters

lde1

length of de1

lde2

length of de2

lpart

length of part

lga1t

length of ga1t

lga2t

length of ga2t

S

matrix of responses

R

matrix of observed responses indicator

yv

vector of frequencies

k1

number of latent classes for the 1st latent variable

k2

number of latent classes for the 2nd latent variable

rm1

number of dimensions for the 1st latent variable

rm2

number of dimensions for the 2nd latent variable

lv

number of response categories for each item

J

number of items

fv

indicator of constrained parameters

disc

presence of discrimination parameters

glob

indicator of global parametrization for the covariates

refitem

vector of reference items

miss

indicator of presence of missing responses

ltype

type of logit

XX1dis

array of covariates for the 1st latent variable

XX2dis

array of covariates for the 2nd latent variable

Xlabel

indicator for covariate configuration

ZZ0

design matrix

fort

to use Fortran

Zpar

array for the specification of constraints on the support points of the 1st and the 2nd latent variable and for the item difficulty parameters

zpar

vector for the specification of constraints on the support points of the 1st and the 2nd latent variable and for the item difficulty parameters

Zga1

matrix for the specification of constraints on the item discriminating indices for the 1st latent variable

zga1

vector for the specification of constraints on the item discriminating indices for the 1st latent variable

Zga2

matrix for the specification of constraints on the item discriminating indices for the 2nd latent variable

zga2

vector for the specification of constraints on the item discriminating indices for the 2nd latent variable

items1

items affected by the 1st latent variable

items2

items affected by the 2nd latent variable

Value

lk

log-likelihood function

sc

score vector

Author(s)

Francesco Bartolucci - University of Perugia (IT)


Display the log-likelihood at convergence of est_multi_poly_between object

Description

Given the output from est_multi_poly_between, the log-likelihood at convergence is displayed

Usage

## S3 method for class 'est_multi_poly_between'
logLik(object, ...)

Arguments

object

output from est_multi_poly_between

...

further arguments passed to or from other methods

Author(s)

Francesco Bartolucci - University of Perugia (IT)


Display the log-likelihood at convergence of est_multi_poly_within object

Description

Given the output from est_multi_poly_within, the log-likelihood at convergence is displayed

Usage

## S3 method for class 'est_multi_poly_within'
logLik(object, ...)

Arguments

object

output from est_multi_poly_within

...

further arguments passed to or from other methods

Author(s)

Francesco Bartolucci - University of Perugia (IT)


Print the output of est_multi_poly_between object

Description

Given the output from est_multi_poly_between, the call of it is written

Usage

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

Arguments

x

output from est_multi_poly_between

...

further arguments passed to or from other methods

Author(s)

Francesco Bartolucci - University of Perugia (IT)


Print the call of est_multi_poly_within object

Description

Given the output from est_multi_poly_within, the call of it is written

Usage

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

Arguments

x

output from est_multi_poly_within

...

further arguments passed to or from other methods

Author(s)

Francesco Bartolucci - University of Perugia (IT)


Global probabilities

Description

It provides matrix of probabilities under different parametrizations and for the case of response variables having a different number of categories.

Usage

prob_multi_glob_gen(X, model, be, ind=(1:dim(X)[3]))

Arguments

X

array of all distinct covariate configurations

model

type of logit (g = global, l = local, m = multinomial)

be

initial vector of regression coefficients

ind

vector to link responses to covariates

Value

Pdis

matrix of distinct probability vectors

P

matrix of the probabilities for each covariate configuration

Author(s)

Francesco Bartolucci - University of Perugia (IT)

References

Colombi, R. and Forcina, A. (2001), Marginal regression models for the analysis of positive association of ordinal response variables, Biometrika, 88, 1007-1019.

Glonek, G. F. V. and McCullagh, P. (1995), Multivariate logistic models, Journal of the Royal Statistical Society, Series B, 57, 533-546.


RLMS dataset

Description

This dataset contains the data about job satisfaction described in: Bartolucci, F., Bacci, S., and Gnaldi, M. (2015), Statistical Analysis of Questionnaires: A Unified Approach Based on R and Stata, Chapman and Hall/CRC press

Usage

data(RLMS)

Format

A data frame with 1485 observations about four polytomous items with covariates:

marital

marital status of the respondent

education

educational level of the respondent

gender

gender of the respondent

age

age of the respondent

work

work status of the respondent

Y1

1st item response

Y2

2nd item response

Y3

3rd item response

Y4

4th item response

References

Bartolucci, F., Bacci, S., and Gnaldi, M. (2015), Statistical Analysis of Questionnaires: A Unified Approach Based on R and Stata, Chapman and Hall/CRC press

Examples

data(RLMS)
 ## maybe str(RLMS)
 str(RLMS)

Search for the global maximum of the log-likelihood of between-item muldimensional models

Description

It searches for the global maximum of the log-likelihood of between-item muldimensional models given a vector of possible number of classes to try for.

Usage

search.model_between(S, yv = rep(1, ns), kv, X = NULL,
                     link = c("global","local"), disc = FALSE, difl = FALSE,
                     multi = 1:J, fort = FALSE, tol1 = 10^-6, tol2 = 10^-10,
                     glob = FALSE, disp = FALSE, output = FALSE,
                     out_se = FALSE, nrep = 2, Zth=NULL,zth=NULL,
                     Zbe=NULL, zbe=NULL,Zga=NULL,zga=NULL)

Arguments

S

matrix of all response sequences observed at least once in the sample and listed row-by-row (use NA for missing responses)

yv

vector of the frequencies of every response configuration in S

kv

vector of the possible numbers of latent classes

X

matrix of covariates affecting the weights

link

type of link function ("global" for global logits, "local" for local logits); with global logits a graded response model results; with local logits a partial credit model results (with dichotomous responses, global logits is the same as using local logits resulting in the Rasch or the 2PL model depending on the value assigned to disc)

disc

indicator of constraints on the discriminating indices (FALSE = all equal to one, TRUE = free)

difl

indicator of constraints on the difficulty levels (FALSE = free, TRUE = rating scale parametrization)

multi

matrix with a number of rows equal to the number of dimensions and elements in each row equal to the indices of the items measuring the dimension corresponding to that row for the latent variable

fort

to use Fortran routines when possible

tol1

tolerance level for checking convergence of the algorithm as relative difference between consecutive log-likelihoods (initial check based on random starting values)

tol2

tolerance level for checking convergence of the algorithm as relative difference between consecutive log-likelihoods (final converngece)

glob

to use global logits in the covariates

disp

to display the likelihood evolution step by step

output

to return additional outputs (Piv,Pp,lkv)

out_se

to return standard errors

nrep

number of repetitions of each random initialization

Zth

matrix for the specification of constraints on the support points

zth

vector for the specification of constraints on the support points

Zbe

matrix for the specification of constraints on the item difficulty parameters

zbe

vector for the specification of constraints on the item difficulty parameters

Zga

matrix for the specification of constraints on the item discriminating indices

zga

vector for the specification of constraints on the item discriminating indices

Value

out.single

output of each single model for each k in kv; it is similar to output from est_multi_poly_between, with the addition of values of number of latent classes (k) and the sequence of log-likelihoods (lktrace) for the deterministic start, for each random start, and for the final estimation obtained with a tolerance level equal to tol2

aicv

Akaike Information Criterion index for each k in kv

bicv

Bayesian Information Criterion index for each k in kv

entv

Entropy index for each k in kv

necv

NEC index for each k in kv

lkv

log-likelihood at convergence of the EM algorithm for each k in kv

errv

trace of any errors occurred during the estimation process for each k in kv

Author(s)

Francesco Bartolucci, Silvia Bacci - University of Perugia (IT)

References

Bartolucci, F., Bacci, S. and Gnaldi, M. (2014), MultiLCIRT: An R package for multidimensional latent class item response models, Computational Statistics & Data Analysis, 71, 971-985.

Examples

## Not run: 
# Fit a Graded response model with two latent variables (free discrimination
# and difficulty parameters; two latent classes):
data(SF12_nomiss)
S = SF12_nomiss[,1:12]
X = SF12_nomiss[,13]
multi0 = rbind(c(1:5, 8), c(6:7,9:12))
out1 = search.model_between(S=S,kv=1:3,X=X,link="global",disc=TRUE,
                               multi=multi0,fort=TRUE,disp=TRUE,out_se=TRUE) 

# Display output
out1$lkv
out1$bicv

# Display output with 2 classes:
out1$out.single[[2]]
out1$out.single[[2]]$lktrace
out1$out.single[[2]]$Th
out1$out.single[[2]]$piv
out1$out.single[[2]]$gac
out1$out.single[[2]]$Bec


## End(Not run)

Search for the global maximum of the log-likelihood of within-item muldimensional models

Description

It searches for the global maximum of the log-likelihood of within-item muldimensional models given a vector of possible number of classes to try for.

Usage

search.model_within(S, yv = rep(1, ns), kv1, kv2, X = NULL, 
                    link = c("global","local"), disc = FALSE, difl = FALSE, 
                    multi1, multi2, fort = FALSE, tol1 = 10^-6, tol2 = 10^-10,
                    glob = FALSE, disp = FALSE, output = FALSE, out_se = FALSE, 
                    nrep = 2, Zth1 = NULL, zth1 = NULL, Zth2=NULL, zth2=NULL, 
                    Zbe=NULL, zbe=NULL, Zga1=NULL, zga1=NULL, Zga2=NULL, 
                    zga2=NULL)

Arguments

S

matrix of all response sequences observed at least once in the sample and listed row-by-row (use NA for missing responses)

yv

vector of the frequencies of every response configuration in S

kv1

vector of the possible numbers of ability levels (or latent classes) for the 1st latent variable

kv2

vector of the possible numbers of ability levels (or latent classes) for the 2nd latent variable

X

matrix of covariates affecting the weights

link

type of link function ("global" for global logits, "local" for local logits); with global logits a graded response model results; with local logits a partial credit model results (with dichotomous responses, global logits is the same as using local logits resulting in the Rasch or the 2PL model depending on the value assigned to disc)

disc

indicator of constraints on the discriminating indices (FALSE = all equal to one, TRUE = free)

difl

indicator of constraints on the difficulty levels (FALSE = free, TRUE = rating scale parametrization)

multi1

matrix with a number of rows equal to the number of dimensions and elements in each row equal to the indices of the items measuring the dimension corresponding to that row for the 1st latent variable

multi2

matrix with a number of rows equal to the number of dimensions and elements in each row equal to the indices of the items measuring the dimension corresponding to that row for the 2nd latent variable

fort

to use Fortran routines when possible

tol1

tolerance level for checking convergence of the algorithm as relative difference between consecutive log-likelihoods (initial check based on random starting values)

tol2

tolerance level for checking convergence of the algorithm as relative difference between consecutive log-likelihoods (final convergence)

glob

to use global logits in the covariates

disp

to display the likelihood evolution step by step

output

to return additional outputs (Piv,Pp,lkv)

out_se

to return standard errors

nrep

number of repetitions of each random initialization

Zth1

matrix for the specification of constraints on the support points for the 1st latent variable

zth1

vector for the specification of constraints on the support points for the 1st latent variable

Zth2

matrix for the specification of constraints on the support points for the 2nd latent variable

zth2

vector for the specification of constraints on the support points for the 2nd latent variable

Zbe

matrix for the specification of constraints on the item difficulty parameters

zbe

vector for the specification of constraints on the item difficulty parameters

Zga1

matrix for the specification of constraints on the item discriminating indices for the 1st latent variable

zga1

vector for the specification of constraints on the item discriminating indices for the 1st latent variable

Zga2

matrix for the specification of constraints on the item discriminating indices for the 2nd latent variable

zga2

vector for the specification of constraints on the item discriminating indices for the 2nd latent variable

Value

out.single

output of each single model for each k in kv1 and kv2; it is similar to output from est_multi_poly_within, with the addition of values of number of latent classes for the 1st latent variable (k1) and the 2nd latent variable (k2) and the sequence of log-likelihoods (lktrace) for the deterministic start, for each random start, and for the final estimation obtained with a tolerance level equal to tol2

aicv

Akaike Information Criterion index for each k in kv1 and kv2

bicv

Bayesian Information Criterion index for each k in kv1 and kv2

entv

Entropy index for each k in kv1 and kv2

necv

NEC index for each k in kv1 and kv2

lkv

log-likelihood at convergence of the EM algorithm for each k in kv1 and kv2

errv

trace of any errors occurred during the estimation process for each k in kv1 and kv2

Author(s)

Francesco Bartolucci, Silvia Bacci - University of Perugia (IT)

References

Bartolucci, F., Bacci, S. and Gnaldi, M. (2014), MultiLCIRT: An R package for multidimensional latent class item response models, Computational Statistics & Data Analysis, 71, 971-985.

Examples

## Not run: 
# Fit the model under different within-item multidimensional structures
# for SF12_nomiss data
data(SF12_nomiss)
S = SF12_nomiss[,1:12]
X = SF12_nomiss[,13]

# Partial credit model with two latent variables sharing six items 
# (free difficulty parameters and constrained discriminating parameters; 
# 1 to 3 latent classes for the 1st latent variable and 1 to 2 classes for the 2nd latent variable; 
# one covariate):
multi1 = c(1:5, 8:12)
multi2 = c(6:12, 1)
out1 = search.model_within(S=S,kv1=1:3,kv2=1:2,X=X,link="global",disc=FALSE,
                             multi1=multi1,multi2=multi2,disp=TRUE,
                             out_se=TRUE,tol1=10^-4, tol2=10^-7, nrep=1)
                             
# Main output
out1$lkv 
out1$aicv
out1$bicv 
# Model with 2 latent classes for each latent variable
out1$out.single[[4]]$k1 
out1$out.single[[4]]$k2 
out1$out.single[[4]]$Th1          
out1$out.single[[4]]$Th2 
out1$out.single[[4]]$piv1 
out1$out.single[[4]]$piv2   
out1$out.single[[4]]$ga1c
out1$out.single[[4]]$ga2c   
out1$out.single[[4]]$Bec            

## End(Not run)

SF12 dataset

Description

This data set contains the responses of 620 oncological patients to 12 ordinal polytomous items that measure the health-related quality of life, according to the Italian release of Short-Form 12 version 2 (SF-12v2); patient's age is also provided.

Usage

data(SF12)

Format

A dataframe with 620 observations on 12 items and one covariate:

Y1

general health

Y2

limits in moderate activities

Y3

limits in climbing several flights of stairs

Y4

accomplished less than he/she would like, as a result of his/her physical health

Y5

limited in the kind of work or daily activities, as a result of his/her physical health

Y6

accomplished less than he/she would like, as a result of his/her emotional health

Y7

did work less carefully than usual, as a result of his/her emotional health

Y8

how much did pain interfere with normal work

Y9

how much of the time have he/she felt calm and peaceful

Y10

how much of the time did he/she have a lot of energy

Y11

how much of the time have he/she felt downhearted and depressed

Y12

how much of the time physical health or emotional health interfered with social activities

age

age of the respondent

Details

All items have 5 response categories, with the exception of items Y2 and Y3 having 3 response categories: the minimum value 0 correspond to a low level of quality of life, whereas the maximum value corresponds to a high level of quality of life. A proportion of 0.205 patients (127 out of 620) has missing responses (NA) on one or more items.

References

Ware, J., Kosinski, M., Turner-Bowker, D. and Gandek, B. (2002), SF-12v2. How to score version 2 of the SF-12 health survey, QualityMetric Incorporated: Lincoln.

Examples

data(SF12)
 dim(SF12)
 ## maybe str(SF12)
 str(SF12)

SF12 dataset without missing responses

Description

This data set contains the responses of 493 oncological patients to 12 ordinal polytomous items that measure the health-related quality of life, according to the Italian release of Short-Form 12 version 2 (SF-12v2); patient's age is also provided.

Usage

data(SF12)

Format

A dataframe with 493 observations on 12 items and one covariate:

Y1

general health

Y2

limits in moderate activities

Y3

limits in climbing several flights of stairs

Y4

accomplished less than he/she would like, as a result of his/her physical health

Y5

limited in the kind of work or daily activities, as a result of his/her physical health

Y6

accomplished less than he/she would like, as a result of his/her emotional health

Y7

did work less carefully than usual, as a result of his/her emotional health

Y8

how much did pain interfere with normal work

Y9

how much of the time have he/she felt calm and peaceful

Y10

how much of the time did he/she have a lot of energy

Y11

how much of the time have he/she felt downhearted and depressed

Y12

how much of the time physical health or emotional health interfered with social activities

age

age of the respondent

Details

All items have 5 response categories, with the exception of items Y2 and Y3 having 3 response categories: the minimum value 0 correspond to a low level of quality of life, whereas the maximum value corresponds to a high level of quality of life. All records are complete.

References

Ware, J., Kosinski, M., Turner-Bowker, D. and Gandek, B. (2002), SF-12v2. How to score version 2 of the SF-12 health survey, QualityMetric Incorporated: Lincoln.

Examples

data(SF12_nomiss)
 dim(SF12_nomiss)
 ## maybe str(SF12_nomiss)
 str(SF12_nomiss)

Print the output of est_multi_poly_between object

Description

Given the output from est_multi_poly_between, it is written in a readable form

Usage

## S3 method for class 'est_multi_poly_between'
summary(object, ...)

Arguments

object

output from est_multi_poly_between

...

further arguments passed to or from other methods

Author(s)

Francesco Bartolucci - University of Perugia (IT)


Print the output of est_multi_poly_within object

Description

Given the output from est_multi_poly_within, it is written in a readable form

Usage

## S3 method for class 'est_multi_poly_within'
summary(object, ...)

Arguments

object

output from est_multi_poly_within

...

further arguments passed to or from other methods

Author(s)

Francesco Bartolucci - University of Perugia (IT)


Display the estimated variance-and-covariance matrix of est_multi_poly_between object

Description

Given the output from est_multi_poly_between, the estimated variance-and-covariance matrix is displayed

Usage

## S3 method for class 'est_multi_poly_between'
vcov(object, ...)

Arguments

object

output from est_multi_poly_between

...

further arguments passed to or from other methods

Author(s)

Francesco Bartolucci - University of Perugia (IT)


Display the estimated variance-and-covariance matrix of est_multi_poly_within object

Description

Given the output from est_multi_poly_within, the estimated variance-and-covariance matrix is displayed

Usage

## S3 method for class 'est_multi_poly_within'
vcov(object, ...)

Arguments

object

output from est_multi_poly_within

...

further arguments passed to or from other methods

Author(s)

Francesco Bartolucci - University of Perugia (IT)