| get.log_lik | R Documentation |
For Stan-fitted models, returns the posterior draws of pointwise
log-likelihood (an S \times N_{\text{obs}} matrix for most models,
or S \times N for FCDCM and FCGDINA). For EM and iStEM fits,
returns NULL.
get.log_lik(object, ...)
## Default S3 method:
get.log_lik(object, ...)
object |
A fitted ForceChoice model object. |
... |
Additional arguments (currently ignored). |
The returned matrix can be passed directly to loo or
waic for model comparison.
An S \times N matrix of pointwise log-likelihood draws
(Stan), or NULL (EM / iStEM).
get.log_lik(default): Default method; returns object$log_lik
when present and NULL otherwise.
# stan code, long time
sim <- sim.data.MIRT(N = 20, I = 6, D = 2, model = "2PL")
fit <- fit.MIRT(sim$response, model = "2PL", D = 2, method = "stan")
log_lik <- get.log_lik(fit)
loo::loo(log_lik)
loo::waic(log_lik)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.