View source: R/api-prediction.R
| sample_mfrm_plausible_values | R Documentation |
Sample approximate plausible values under a fixed MML calibration
sample_mfrm_plausible_values(
fit,
new_data,
person = NULL,
facets = NULL,
score = NULL,
weight = NULL,
n_draws = 5,
interval_level = 0.95,
seed = NULL
)
fit |
Output from |
new_data |
Long-format data for the future or partially observed units to be scored. |
person |
Optional person column in |
facets |
Optional facet-column mapping for |
score |
Optional score column in |
weight |
Optional weight column in |
n_draws |
Number of posterior draws per person. Must be a positive integer. |
interval_level |
Posterior interval level passed to
|
seed |
Optional seed for reproducible posterior draws. |
sample_mfrm_plausible_values() is a thin public wrapper around
predict_mfrm_units() that exposes the fixed-calibration posterior draws as
a standalone object. It is useful when downstream workflows want repeated
latent-value imputations rather than just one posterior EAP summary.
In the current mfrmr implementation these are approximate plausible
values drawn from the fitted quadrature-grid posterior under a fixed MML
calibration. They should be interpreted as posterior uncertainty summaries
for the scored persons, not as deterministic future truth values and not as
a full many-facet plausible-values procedure with additional population
modeling.
An object of class mfrm_plausible_values with components:
values: one row per person per draw
estimates: companion posterior EAP summaries
audit: row-preparation audit
input_data: cleaned canonical scoring rows retained from new_data
settings: scoring settings
notes: interpretation notes
values contains one row per person per draw.
estimates contains the companion posterior EAP summaries from
predict_mfrm_units().
summary() reports draw counts and empirical draw summaries by person.
This helper does not update the calibration, estimate new non-person facet levels, or provide exact future true values. It samples from the fixed-grid posterior implied by the existing MML fit.
The underlying posterior scoring follows the usual MML/EAP framework of Bock and Aitkin (1981). The interpretation of multiple posterior draws as plausible-value-style summaries follows the general logic discussed by Mislevy (1991), while the current implementation remains a practical fixed- calibration approximation rather than a full published many-facet plausible- values method.
Bock, R. D., & Aitkin, M. (1981). Marginal maximum likelihood estimation of item parameters: Application of an EM algorithm. Psychometrika, 46(4), 443-459.
Mislevy, R. J. (1991). Randomization-based inference about latent variables from complex samples. Psychometrika, 56(2), 177-196.
predict_mfrm_units(), summary.mfrm_plausible_values
toy <- load_mfrmr_data("example_core")
keep_people <- unique(toy$Person)[1:18]
toy_fit <- suppressWarnings(
fit_mfrm(
toy[toy$Person %in% keep_people, , drop = FALSE],
"Person", c("Rater", "Criterion"), "Score",
method = "MML",
quad_points = 5,
maxit = 15
)
)
new_units <- data.frame(
Person = c("NEW01", "NEW01"),
Rater = unique(toy$Rater)[1],
Criterion = unique(toy$Criterion)[1:2],
Score = c(2, 3)
)
pv <- sample_mfrm_plausible_values(toy_fit, new_units, n_draws = 3, seed = 1)
summary(pv)$draw_summary
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.