Extracts item / step / person parameters from a TAM::tam.mml(),
TAM::tam.jml(), or TAM::tam.mml.mfr() fit. The multi-facet
tam.mml.mfr() path is detected automatically and each
non-person facet is mapped onto a row of fit$facets$others
so downstream MFRM helpers (e.g. plot_qc_dashboard()) work
on the imported object.
Usage
import_tam_fit(
fit,
model = c("RSM", "PCM", "GPCM"),
item_facet = "Item",
compute_fit = FALSE
)Arguments
- fit
An object returned by
TAM::tam.mml(),TAM::tam.jml(), orTAM::tam.mml.mfr().- model
Same as
import_mirt_fit().- item_facet
Name to assign to the item facet for the single-facet path. Ignored when the input is a multi-facet
tam.mml.mfrfit (the original facet names are preserved).- compute_fit
Logical. When
TRUE, runTAM::tam.fit()andTAM::tam.personfit()to populate Infit / Outfit columns on the returned facet tables, plus build a measurement-sidemfrm_diagnosticsbundle. DefaultFALSE.
Value
An mfrm_imported_fit object. Slots mirror
import_mirt_fit().
Examples
if (FALSE) { # \dontrun{
if (requireNamespace("TAM", quietly = TRUE)) {
response_matrix <- matrix(sample(0:3, 60, replace = TRUE), nrow = 20)
colnames(response_matrix) <- paste0("Item", seq_len(ncol(response_matrix)))
fit <- TAM::tam.mml(resp = response_matrix, irtmodel = "PCM")
imported <- import_tam_fit(fit, model = "PCM")
imported$summary
}
} # }