| logLik.FCDCM | R Documentation |
Extracts the marginal log-likelihood from a fitted ForceChoice model
object. For continuous-trait IRT models, the log-likelihood is computed
by numerically integrating the joint likelihood of the observed responses
over the latent trait distribution using Cartesian-product normal
quadrature. For FCGDINA, the marginal likelihood is obtained by summing
over the 2^D discrete attribute profiles.
For a sample of N independent persons with responses
\mathbf{Y}_j, the marginal log-likelihood is:
\ell = \sum_{j=1}^{N} \log \int
P(\mathbf{Y}_j \mid \boldsymbol{\theta})\,
\phi_D(\boldsymbol{\theta}; \mathbf{0}, \boldsymbol{\Sigma})\,
d\boldsymbol{\theta},
where \phi_D(\cdot) is the D-variate normal density with
correlation matrix \boldsymbol{\Sigma}. The integral is approximated
on a Cartesian-product quadrature grid over [-6, 6]^D.
The continuous-trait quadrature weights are normalized normal densities
computed on the grid points, with the fitted correlation matrix used when
available. FCGDINA instead uses the estimated class-proportion vector
\boldsymbol{\pi} over attribute profiles.
S3 methods for extracting marginal log-likelihoods from fitted ForceChoice model objects.
## S3 method for class 'FCDCM'
logLik(object, theta.low = NULL, theta.up = NULL, L = NULL, ...)
## S3 method for class 'FCGDINA'
logLik(object, ...)
## S3 method for class 'FCGGUM'
logLik(object, theta.low = NULL, theta.up = NULL, L = NULL, ...)
## S3 method for class 'FCMIRT'
logLik(object, theta.low = NULL, theta.up = NULL, L = NULL, ...)
## S3 method for class 'MGGUM'
logLik(object, theta.low = NULL, theta.up = NULL, L = NULL, ...)
## S3 method for class 'MGPCM'
logLik(object, theta.low = NULL, theta.up = NULL, L = NULL, ...)
## S3 method for class 'MIRT'
logLik(object, theta.low = NULL, theta.up = NULL, L = NULL, ...)
## S3 method for class 'TIRT'
logLik(object, theta.low = NULL, theta.up = NULL, L = NULL, ...)
object |
A fitted model object of class |
theta.low |
Numeric; lower bound for the quadrature grid on the
latent scale. Used by continuous-trait models; if |
theta.up |
Numeric; upper bound for the quadrature grid on the latent
scale. Used by continuous-trait models; if |
L |
Integer; number of quadrature points per dimension. If
|
... |
Additional arguments passed to the method. Currently ignored by the implemented methods. |
For MIRT, MGPCM, MGGUM, FCMIRT, FCGGUM, TIRT, and FCDCM objects, the
likelihood is evaluated by marginalizing over a normal quadrature grid
(and, for FCDCM, over attribute profiles conditional on the higher-order
trait). For FCGDINA objects, the likelihood is evaluated exactly over the
2^D latent attribute profiles.
An object of class "logLik" with attributes:
nobs: number of observations (N)
df: number of free parameters
theta.norm: continuous-trait quadrature grid points, when
applicable
prob: model-implied response probabilities at grid points,
when applicable
pi: quadrature weights or FCGDINA class probabilities
L: quadrature grid size used, when applicable
prob.class: FCGDINA class-conditional forced-choice
probabilities, when applicable
An object of class "logLik": a length-one numeric vector
containing the marginal log-likelihood, with at least attributes
nobs (sample size) and df (number of free parameters).
Continuous-trait methods also attach quadrature diagnostics such as
theta.norm, prob, pi, and L; FCGDINA attaches
latent-class probabilities and class-conditional response probabilities.
logLik(FCDCM): FCDCM model: higher-order trait quadrature with exact
marginalization over discrete attribute profiles.
logLik(FCGDINA): FCGDINA model: marginal forced-choice probabilities over
all 2^D attribute profiles.
logLik(FCGGUM): FCGGUM model: forced-choice unfolding block
probabilities with multivariate normal quadrature.
logLik(FCMIRT): FCMIRT model: forced-choice block pattern
probabilities with multivariate normal quadrature.
logLik(MGGUM): MGGUM model: polytomous unfolding responses with
per-item block-structured quadrature evaluation.
logLik(MGPCM): MGPCM model: polytomous responses integrated over the
fitted multivariate normal latent distribution.
logLik(MIRT): MIRT model: multivariate normal quadrature over
D-dimensional latent space with Gaussian correlation structure.
logLik(TIRT): TIRT model: pairwise binary probit probabilities
with multivariate normal quadrature over traits.
fit.MIRT, get.fit.index,
good.of.fit
sim <- sim.data.MIRT(N = 20, I = 6, D = 2, model = "m2pl")
fit <- fit.MIRT(
sim$response, model = "m2pl", D = 2, method = "iStEM",
control.method = list(
vis = FALSE, seed = 123,
M = 2, B = 2, burnin.maxitr = 2,
maxitr = 3, eps1 = 10, eps2 = 10,
estimate.se = FALSE)
)
ll <- logLik(fit, L = 9)
as.numeric(ll)
attr(ll, "df")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.