getirt {irtQ} | R Documentation |
Extract Components from 'est_irt', 'est_mg', or 'est_item' Objects
Description
Extracts internal components from an object of class est_irt
(from est_irt()
), est_mg
(from est_mg()
), or est_item
(from est_item()
).
Usage
getirt(x, ...)
## S3 method for class 'est_irt'
getirt(x, what, ...)
## S3 method for class 'est_mg'
getirt(x, what, ...)
## S3 method for class 'est_item'
getirt(x, what, ...)
Arguments
x |
An object of class |
... |
Additional arguments passed to or from other methods. |
what |
A character string specifying the name of the internal component to extract. |
Details
The following components can be extracted from an object of class est_irt
created by est_irt()
:
- estimates
A data frame containing both the item parameter estimates and their corresponding standard errors.
- par.est
A data frame containing only the item parameter estimates.
- se.est
A data frame containing the standard errors of the item parameter estimates, calculated using the cross-product approximation method (Meilijson, 1989).
- pos.par
A data frame indicating the position index of each estimated item parameter. This is useful when interpreting the variance-covariance matrix.
- covariance
A variance-covariance matrix of the item parameter estimates.
- loglikelihood
The total marginal log-likelihood value summed across all items.
- aic
Akaike Information Criterion (AIC) based on the marginal log-likelihood.
- bic
Bayesian Information Criterion (BIC) based on the marginal log-likelihood.
- group.par
A data frame containing the mean, variance, and standard deviation of the latent variable's prior distribution.
- weights
A two-column data frame containing quadrature points (first column) and corresponding weights (second column) of the (updated) latent trait prior.
- posterior.dist
A matrix of normalized posterior densities for all response patterns at each quadrature point. Rows represent examinees, and columns represent quadrature points.
- data
A data frame of the examinee response dataset used in estimation.
- scale.D
The scaling constant (usually 1 or 1.7) used in the IRT model.
- ncase
The number of unique response patterns.
- nitem
The number of items included in the dataset.
- Etol
The convergence criterion used for the E-step in the EM algorithm.
- MaxE
The maximum number of E-steps allowed during EM estimation.
- aprior
A list describing the prior distribution for item slope parameters.
- bprior
A list describing the prior distribution for item difficulty (or threshold) parameters.
- gprior
A list describing the prior distribution for item guessing parameters.
- npar.est
The total number of parameters estimated.
- niter
The number of EM cycles completed.
- maxpar.diff
The maximum change in parameter estimates at convergence.
- EMtime
Computation time (in seconds) for the EM algorithm.
- SEtime
Computation time (in seconds) for estimating standard errors.
- TotalTime
Total computation time (in seconds) for model estimation.
- test.1
Result of the first-order test indicating whether the gradients were sufficiently close to zero.
- test.2
Result of the second-order test indicating whether the information matrix was positive definite (a condition for maximum likelihood).
- var.note
A note indicating whether the variance-covariance matrix was successfully derived from the information matrix.
- fipc
Logical value indicating whether Fixed Item Parameter Calibration (FIPC) was applied.
- fipc.method
The specific method used for FIPC.
- fix.loc
An integer vector indicating the positions of fixed items used during FIPC.
Components that can be extracted from an object of class est_mg
created by
est_mg()
include:
- estimates
A list with two components:
overall
andgroup
.-
overall
: A data frame containing item parameter estimates and their standard errors, based on the combined data set across all groups. -
group
: A list of group-specific data frames containing item parameter estimates and standard errors for each group.
-
- par.est
Same structure as
estimates
, but containing only the item parameter estimates (without standard errors).- se.est
Same structure as
estimates
, but containing only the standard errors of the item parameter estimates. The standard errors are computed using the cross-product approximation method (Meilijson, 1989).- pos.par
A data frame indicating the position index of each estimated parameter. This index is based on the combined item set across all groups and is useful when interpreting the variance-covariance matrix.
- covariance
A variance-covariance matrix for the item parameter estimates based on the combined data from all groups.
- loglikelihood
A list with
overall
andgroup
components:-
overall
: The marginal log-likelihood summed over all unique items across all groups. -
group
: Group-specific marginal log-likelihood values.
-
- aic
Akaike Information Criterion (AIC) computed from the overall log-likelihood.
- bic
Bayesian Information Criterion (BIC) computed from the overall log-likelihood.
- group.par
A list of group-specific summary statistics (mean, variance, and standard deviation) of the latent trait prior distribution.
- weights
A list of two-column data frames (one per group) containing the quadrature points (first column) and the corresponding weights (second column) for the updated prior distributions.
- posterior.dist
A matrix of normalized posterior densities for all response patterns at each quadrature point. Rows correspond to individuals, and columns to quadrature points.
- data
A list with
overall
andgroup
components, each containing examinee response data.- scale.D
The scaling constant used in the IRT model (typically 1 or 1.7).
- ncase
A list with
overall
andgroup
components indicating the number of response patterns in each.- nitem
A list with
overall
andgroup
components indicating the number of items in the respective response sets.- Etol
Convergence criterion used for the E-step in the EM algorithm.
- MaxE
Maximum number of E-steps allowed in the EM algorithm.
- aprior
A list describing the prior distribution for item slope parameters.
- gprior
A list describing the prior distribution for item guessing parameters.
- npar.est
Total number of parameters estimated across all unique items.
- niter
Number of EM cycles completed.
- maxpar.diff
Maximum change in item parameter estimates at convergence.
- EMtime
Computation time (in seconds) for EM estimation.
- SEtime
Computation time (in seconds) for estimating standard errors.
- TotalTime
Total computation time (in seconds) for model estimation.
- test.1
First-order condition test result indicating whether gradients converged sufficiently.
- test.2
Second-order condition test result indicating whether the information matrix is positive definite.
- var.note
A note indicating whether the variance-covariance matrix was successfully derived from the information matrix.
- fipc
Logical value indicating whether Fixed Item Parameter Calibration (FIPC) was used.
- fipc.method
The method used for FIPC.
- fix.loc
A list with
overall
andgroup
components specifying the locations of fixed items when FIPC was applied.
Components that can be extracted from an object of class est_item
created by
est_item()
include:
- estimates
A data frame containing both the item parameter estimates and their corresponding standard errors.
- par.est
A data frame containing only the item parameter estimates.
- se.est
A data frame containing the standard errors of the item parameter estimates, computed using observed information functions.
- pos.par
A data frame indicating the position index of each estimated item parameter. This is useful when interpreting the variance-covariance matrix.
- covariance
A variance-covariance matrix of the item parameter estimates.
- loglikelihood
The sum of log-likelihood values across all items in the complete data set.
- data
A data frame of examinee response data.
- score
A numeric vector of examinees' ability values used as fixed effects during estimation.
- scale.D
The scaling constant (typically 1 or 1.7) used in the IRT model.
- convergence
A character string indicating the convergence status of the item parameter estimation.
- nitem
The total number of items included in the response data.
- deleted.item
Items that contained no response data and were excluded from estimation.
- npar.est
The total number of estimated item parameters.
- n.response
An integer vector indicating the number of responses used to estimate parameters for each item.
- TotalTime
Total computation time (in seconds) for the estimation process.
See est_irt()
, est_mg()
, and est_item()
for more details.
Value
The internal component extracted from an object of class est_irt
, est_mg
, or est_item
,
depending on the input to the x
argument.
Methods (by class)
-
getirt(est_irt)
: An object created by the functionest_irt()
. -
getirt(est_mg)
: An object created by the functionest_mg()
. -
getirt(est_item)
: An object created by the functionest_item()
.
Author(s)
Hwanggyu Lim hglim83@gmail.com
See Also
est_irt()
, est_mg()
, est_item()
Examples
# Fit a 2PL model to the LSAT6 data
mod.2pl <- est_irt(data = LSAT6, D = 1, model = "2PLM", cats = 2)
# Extract item parameter estimates
(est.par <- getirt(mod.2pl, what = "par.est"))
# Extract standard error estimates
(est.se <- getirt(mod.2pl, what = "se.est"))
# Extract the variance-covariance matrix of item parameter estimates
(cov.mat <- getirt(mod.2pl, what = "covariance"))