View source: R/api-simulation-spec.R
| extract_mfrm_sim_spec | R Documentation |
Derive a simulation specification from a fitted MFRM object
extract_mfrm_sim_spec(
fit,
assignment = c("auto", "crossed", "rotating", "resampled", "skeleton"),
latent_distribution = c("normal", "empirical"),
source_data = NULL,
person = NULL,
group = NULL
)
fit |
Output from |
assignment |
Assignment design to record in the returned specification.
Use |
latent_distribution |
Latent-value generator to record in the returned
specification. |
source_data |
Optional original source data used to recover additional
non-calibration columns, currently person-level |
person |
Optional person column name in |
group |
Optional group column name in |
extract_mfrm_sim_spec() uses a fitted model as a practical starting point
for later simulation studies. It extracts:
design counts from the fitted data
empirical spread of person and facet estimates
optional empirical support values for semi-parametric draws
fitted threshold values
either a simplified assignment summary ("crossed" / "rotating"),
empirical resampled assignment profiles ("resampled"), or an observed
response skeleton ("skeleton", optionally carrying Group/Weight)
This is intended as a fit-derived parametric starting point, not as a claim that the fitted object perfectly recovers the true data-generating mechanism. Users should review and, if necessary, edit the returned specification before using it for design planning.
If you want to carry person-level group labels into a fit-derived observed
response skeleton, provide the original source_data together with
person and group. Group labels are treated as person-level metadata and
are checked for one-label-per-person consistency before being merged.
An object of class mfrm_sim_spec.
The returned object is a simulation specification, not a prediction about one future sample. It captures one convenient approximation to the observed design and estimated spread in the fitted run.
build_mfrm_sim_spec(), simulate_mfrm_data()
toy <- load_mfrmr_data("example_core")
fit <- fit_mfrm(toy, "Person", c("Rater", "Criterion"), "Score", method = "JML", maxit = 15)
spec <- extract_mfrm_sim_spec(fit, latent_distribution = "empirical")
spec$assignment
spec$model
head(spec$threshold_table)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.