loglik_array: Extract the log-likelihood of an estimated model

loglik_arrayR Documentation

Extract the log-likelihood of an estimated model

Description

The loglik_array() methods for measrdcm objects calculates the log-likelihood for an estimated model via the generated quantities functionality in Stan and returns the draws of the log_lik parameter.

Usage

loglik_array(model, ...)

Arguments

model

A measrdcm object.

...

Unused. For future extensions.

Value

A "draws_array" object containing the log-likelihood estimates for the model.

Examples


rstn_mdm_lcdm <- dcm_estimate(
  dcm_specify(dcmdata::mdm_qmatrix, identifier = "item"),
  data = dcmdata::mdm_data,
  missing = NA,
  identifier = "respondent",
  method = "optim",
  seed = 63277,
  backend = "rstan"
)

loglik_array(rstn_mdm_lcdm)


measr documentation built on Jan. 14, 2026, 5:08 p.m.