| Title: | Polytomous Logit-Normit (Graded Logistic) Model Estimation |
|---|---|
| Description: | Performs bivariate composite likelihood and full information maximum likelihood estimation for polytomous logit-normit (graded logistic) item response theory (IRT) models. |
| Authors: | Carl F. Falk and Harry Joe |
| Maintainer: | Carl F. Falk <[email protected]> |
| License: | GPL-3 |
| Version: | 0.2-3 |
| Built: | 2026-05-31 10:14:25 UTC |
| Source: | https://github.com/falkcarl/pln |
Performs bivariate composite likelihood and full information maximum likelihood estimation for polytomous logit-normit (graded logistic) item response theory (IRT) models.
| Package: | pln |
| Type: | Package |
| Version: | 0.2-2 |
| Date: | 2020-07-28 |
| License: | GPL-3 |
| LazyLoad: | yes |
This package currently contains several functions performing estimation of unidimensional (single latent trait) polytomous logit-normit models (also known graded logistic) using bivariate composite likelihood and full information maximum likelihood estimation.
Some code from the ltm package (version 0.9-7) was modified for counting the frequency of response patterns.
Carl Falk [email protected], Harry Joe
Maintainer: Carl F. Falk [email protected]
Bartholomew, D., Knott, M., and Moustaki, I. (2011). Latent Variable Models and Factor Analysis: A Unified Approach, 3rd Edition. Wiley.
Maydeu-Olivares, A., and Joe, H. (2005). Limited and full information estimation
and goodness-of-fit testing in contingency tables: A unified framework.
Journal of the American Statistical Association, 100, 1009-1020.
Maydeu-Olivares, A., and Joe, H. (2006). Limited information and goodness-of-fit testing in multidimensional contingency tables. Psychometrika, 71, 713-732.
Varin, C., Reid, N. and Firth, D. (2011). An overview of composite likelihood methods. Statistica Sinica, 21, 5-42.
A simulated data set with a 5 items, each with 3 ordinal categories labeled as 0,1,2. Each row corresponds to a response pattern with the sixth column containing the frequency of each response pattern.
data(item5fr)data(item5fr)
A simulated data set with a 9 items, each with 5 ordinal categories labeled as 0,1,2,3,4. Each row corresponds to a single individual's response on the 9 items.
data(item9cat5)data(item9cat5)
Full information maximum likelihood and bivariate composite likelihood estimation for polytomous logit-normit and Rasch models, via Newton Raphson iterations.
nrmlepln(x, ncat, nitem=NULL, alphas=NULL, betas=NULL, abound=c(-10,10), bbound=c(-1,10), nq=48, mxiter=200, m2=TRUE, iprint=FALSE) nrmlerasch(x, ncat, nitem=NULL, alphas=NULL, abound=c(-10,10), bbound=c(-1,10), nq=48, mxiter=200, m2=TRUE, iprint=FALSE) nrbcpln(x, ncat, nitem=NULL, alphas=NULL, betas=NULL, abound=c(-10,10), bbound=c(-1,10), nq=48, mxiter=200, se=TRUE, iprint=FALSE)nrmlepln(x, ncat, nitem=NULL, alphas=NULL, betas=NULL, abound=c(-10,10), bbound=c(-1,10), nq=48, mxiter=200, m2=TRUE, iprint=FALSE) nrmlerasch(x, ncat, nitem=NULL, alphas=NULL, abound=c(-10,10), bbound=c(-1,10), nq=48, mxiter=200, m2=TRUE, iprint=FALSE) nrbcpln(x, ncat, nitem=NULL, alphas=NULL, betas=NULL, abound=c(-10,10), bbound=c(-1,10), nq=48, mxiter=200, se=TRUE, iprint=FALSE)
x |
A data matrix. Data can be in one of two formats: 1) raw data
where the number of rows corresponds to an individual's response and
each column represents an item, and 2) a matrix of dimensions
|
ncat |
Number of ordinal categories for each item, coded as
0,...,( |
nitem |
Number of items. If omitted, it is assumed that |
alphas |
A vector of length |
betas |
A vector of length |
abound |
Vector of length 2 that sets upper and lower bounds on parameter estimation for alphas. Currently experimental; changing defaults it not recommended. Estimation problems are more likely solved by changing starting values. |
bbound |
Vector of length 2 that sets upper and lower bounds on parameter estimation for betas. Currently experimental; changing defaults it not recommended. Estimation problems are more likely solved by changing starting values. |
nq |
Number of quadrature points to use during estimation. This argument is currently experimental. It is recommended to use the default of 48. |
mxiter |
Maximum number of iterations for estimation. |
m2 |
Logical. If |
iprint |
Logical. Enables debugging / diagnostic information from C code that conducts estimation. |
se |
Logical. If |
Estimation of graded logistic models is performed under the following parameterization:
Where the items are , and response categories are . is the latent trait, is the logistic distribution function, is an intercept (cutpoint) parameter, and is a slope parameter. When the number of categories for the items is 2, this reduces to the 2PL parameterization:
Both nrmlepln and nrbcpln perform estimation under these parameterizations, via Newton Raphson iterations, using full information maximum likelihood (nrmlepln) and bivariate composite likelihood (nrbcpln). See Maydeu-Olivares and Joe (2005, 2006) for more information on bivariate composite likelihood estimation (see also Varin, Reid, and Firth, 2011). Under nrmlerasch a common parameter is estimated for all items.
A list containing the following slots.
alphasA vector of parameter estimates for alphas. Length is
nitem(ncat-1). Estimates are in order by item, e.g., all alphas
for item 1, followed by all alphas for item 2, and so on.
betasA vector of parameter estimates for betas. Length is nitem.
nllkNegative (composite) log-likelihood for polytomous logit-normit (or Rasch) model.
convInteger indicating whether estimation converged. Currently only returned for composite likelihood estimation.
sealphasA vector of standard errors for the alpha estimates.
sebetasA vector of standard errors for the beta estimates.
invhesInverse Hessian matrix for the MLE estimates.
vcovAsymptotic covariance matrix for the composite likelihood estimates.
teststatValue of .
dfDegrees of freedom for .
pvalP-value for .
Carl F. Falk [email protected], Harry Joe
Bartholomew, D., Knott, M., and Moustaki, I. (2011). Latent Variable Models and Factor Analysis: A Unified Approach, 3rd Edition. Wiley.
Maydeu-Olivares, A., and Joe, H. (2005). Limited and full information estimation
and goodness-of-fit testing in contingency tables: A unified framework.
Journal of the American Statistical Association, 100, 1009-1020.
Maydeu-Olivares, A., and Joe, H. (2006). Limited information and goodness-of-fit testing in multidimensional contingency tables. Psychometrika, 71, 713-732.
Varin, C., Reid, N. and Firth, D. (2011). An overview of composite likelihood methods. Statistica Sinica, 21, 5-42.
### Matrix of response patterns and frequencies data(item5fr) ## ML estimation nrmleplnout<-nrmlepln(item5fr, ncat=3, nitem=5) print(nrmleplnout) ## BCL estimation nrbcplnout<-nrbcpln(item5fr, ncat=3, nitem=5) print(nrbcplnout) ## ML Rasch estimation nrmleraschout<-nrmlerasch(item5fr, ncat=3, nitem=5) print(nrmleraschout) ### Raw data data(item9cat5) ## ML estimation nrmleplnout<-nrmlepln(item9cat5, ncat=5) print(nrmleplnout) ## BCL estimation nrbcplnout<-nrbcpln(item9cat5, ncat=5, se=FALSE) print(nrbcplnout) ## ML Rasch estimation nrmleraschout<-nrmlerasch(item9cat5, ncat=5) print(nrmleraschout)### Matrix of response patterns and frequencies data(item5fr) ## ML estimation nrmleplnout<-nrmlepln(item5fr, ncat=3, nitem=5) print(nrmleplnout) ## BCL estimation nrbcplnout<-nrbcpln(item5fr, ncat=3, nitem=5) print(nrbcplnout) ## ML Rasch estimation nrmleraschout<-nrmlerasch(item5fr, ncat=3, nitem=5) print(nrmleraschout) ### Raw data data(item9cat5) ## ML estimation nrmleplnout<-nrmlepln(item9cat5, ncat=5) print(nrmleplnout) ## BCL estimation nrbcplnout<-nrbcpln(item9cat5, ncat=5, se=FALSE) print(nrbcplnout) ## ML Rasch estimation nrmleraschout<-nrmlerasch(item9cat5, ncat=5) print(nrmleraschout)
Simulate data from polytomous logit-normit (graded logistic) model
simulpln(n, nitem, ncat, alphas, betas)simulpln(n, nitem, ncat, alphas, betas)
n |
Number of responses to generate. |
nitem |
Number of items. |
ncat |
Number of categories for the items. |
alphas |
A vector of length |
betas |
A vector of length |
Data from graded logistic models is generated under the following parameterization:
Where the items are , and response categories are . is the latent trait, is the logistic distribution function, is an intercept (cutpoint) parameter, and is a slope parameter. When the number of categories for the items is 2, this reduces to the 2PL parameterization:
A data matrix in which each row represents a response pattern and the final column represents the frequency of each response pattern.
Carl F. Falk [email protected], Harry Joe
n<-500; ncat<-3; nitem<-5 alphas=c(0,-.5, .2,-1, .4,-.6, .3,-.2, .5,-.5) betas=c(1,1,1,.5,.5) set.seed(1234567) datfr<-simulpln(n,nitem,ncat,alphas,betas) nrmleplnout<-nrmlepln(datfr, ncat=ncat, nitem=nitem) nrmleplnoutn<-500; ncat<-3; nitem<-5 alphas=c(0,-.5, .2,-1, .4,-.6, .3,-.2, .5,-.5) betas=c(1,1,1,.5,.5) set.seed(1234567) datfr<-simulpln(n,nitem,ncat,alphas,betas) nrmleplnout<-nrmlepln(datfr, ncat=ncat, nitem=nitem) nrmleplnout
Computes starting values for estimation of polytomous logit-normit model.
startalphas(x, ncat, nitem = NULL) startbetas(x, ncat, nitem = NULL)startalphas(x, ncat, nitem = NULL) startbetas(x, ncat, nitem = NULL)
x |
A data matrix. Data can be in one of two formats: 1) raw data
where the number of rows corresponds to the number of raw cases and
each column represents an item, and 2) a matrix of dimensions
|
ncat |
Number of ordinal categories for each item, coded as
0,...,( |
nitem |
Number of items. If omitted, it is assumed that |
startalphas computes starting values for the (decreasing) cutpoints
for the items based on logit transformed probabilities, assuming independent items.
startbetas computes starting values for slopes under the polytomous
logit-normit model, using a method based on values that are proportional to the
average correlations of each item with all other items. Starting values are
currently bounded between -.2 and 1.
A vector of starting values, depending on which function was called.
Carl F. Falk [email protected], Harry Joe
### Raw data data(item9cat5) myAlphas<-startalphas(item9cat5, ncat=5) print(myAlphas) myBetas<-startbetas(item9cat5, ncat=5) print(myBetas) nrbcplnout<-nrbcpln(item9cat5, ncat=5, alphas=myAlphas, betas=myBetas, se=FALSE) print(nrbcplnout) ## Matrix of response patterns and frequencies data(item5fr) myAlphas<-startalphas(item5fr, ncat=3, nitem=5) print(myAlphas) myBetas<-startbetas(item5fr, ncat=3, nitem=5) print(myBetas) nrbcplnout<-nrbcpln(item5fr, ncat=3, nitem=5, alphas=myAlphas, betas=myBetas, se=FALSE) print(nrbcplnout)### Raw data data(item9cat5) myAlphas<-startalphas(item9cat5, ncat=5) print(myAlphas) myBetas<-startbetas(item9cat5, ncat=5) print(myBetas) nrbcplnout<-nrbcpln(item9cat5, ncat=5, alphas=myAlphas, betas=myBetas, se=FALSE) print(nrbcplnout) ## Matrix of response patterns and frequencies data(item5fr) myAlphas<-startalphas(item5fr, ncat=3, nitem=5) print(myAlphas) myBetas<-startbetas(item5fr, ncat=3, nitem=5) print(myBetas) nrbcplnout<-nrbcpln(item5fr, ncat=3, nitem=5, alphas=myAlphas, betas=myBetas, se=FALSE) print(nrbcplnout)