View source: R/api-simulation.R
| evaluate_mfrm_recovery | R Documentation |
Runs a compact parameter-recovery simulation study: generate data from a known ordered many-facet data-generating setup, refit the requested model, align estimates to the known truth where location indeterminacy requires it, and summarize bias, RMSE, MAE, correlation, and standard-error coverage.
evaluate_mfrm_recovery(
n_person = 50,
n_rater = 4,
n_criterion = 4,
raters_per_person = n_rater,
design = NULL,
reps = 10,
score_levels = 4,
theta_sd = 1,
rater_sd = 0.35,
criterion_sd = 0.25,
noise_sd = 0,
step_span = 1.4,
model = c("RSM", "PCM", "GPCM"),
step_facet = NULL,
slope_facet = NULL,
thresholds = NULL,
slopes = NULL,
assignment = NULL,
sparse_controls = NULL,
sim_spec = NULL,
fit_method = c("JML", "MML"),
maxit = 25,
quad_points = 7,
include_person = TRUE,
include_diagnostics = FALSE,
diagnostic_fit_df_method = c("both", "engine", "facets"),
seed = NULL
)
n_person |
Number of persons/respondents. |
n_rater |
Number of rater facet levels. |
n_criterion |
Number of criterion/item facet levels. |
raters_per_person |
Number of raters assigned to each person. |
design |
Optional named design override supplied as a named list,
named vector, or one-row data frame. When |
reps |
Number of Monte Carlo replications. |
score_levels |
Number of ordered score categories. |
theta_sd |
Standard deviation of simulated person measures. |
rater_sd |
Standard deviation of simulated rater severities. |
criterion_sd |
Standard deviation of simulated criterion difficulties. |
noise_sd |
Optional observation-level noise added to the linear predictor. |
step_span |
Spread of step thresholds on the logit scale. |
model |
Measurement model recorded in the simulation setup. The current
public generator supports |
step_facet |
Step facet used when |
slope_facet |
Slope facet used when |
thresholds |
Optional threshold specification. Use a numeric vector of
common thresholds; a named list such as |
slopes |
Optional slope specification used when |
assignment |
Assignment design. |
sparse_controls |
Optional named list used when
|
sim_spec |
Optional output from |
fit_method |
Estimation method passed to |
maxit |
Maximum optimizer iterations passed to |
quad_points |
Quadrature points used when |
include_person |
Logical. When |
include_diagnostics |
Logical. When |
diagnostic_fit_df_method |
Fit-ZSTD degrees-of-freedom convention used
for optional diagnostic operating-characteristic summaries. Use |
seed |
Optional random seed. |
This helper is deliberately narrower than evaluate_mfrm_design(). Design
evaluation asks which design condition is operationally adequate; recovery
simulation asks whether the fitted model recovers the known parameters under
one explicit data-generating setup.
Location-like parameters (Person, non-person facets, and steps) are
summarized after mean alignment within each replication and parameter group.
This follows the usual Rasch/MFRM identification convention: adding a common
constant to one location block should not be counted as recovery failure.
Raw, unaligned errors are retained in recovery and summarized as
RawBias / RawRMSE.
For bounded GPCM, supplied generator slopes are treated as relative
discriminations and normalized to the same geometric-mean-one log-slope
identification used by the fitter. Slope recovery is therefore summarized on
the identified log-slope scale without an additional mean-alignment step.
Direct data generation and refitting are supported, but broader GPCM design-
planning claims remain outside the current package boundary.
Sparse linked generators are supported through sim_spec or direct
assignment = "sparse_linked" plus sparse_controls. Their design-density
and rater-link diagnostics are retained in rep_overview; recovery metrics
remain parameter-recovery summaries and should not be read as evidence that
a sparse linking design is adequate by itself.
The returned ademp component follows the simulation-study framing of
Morris, White, and Crowther (2019) and the ADEMP planning/reporting template
used in later simulation-study guidance.
An object of class mfrm_recovery_simulation with components:
recovery: row-level truth/estimate comparisons by replication.
recovery_summary: parameter-type summaries across replications.
rep_overview: replication-level convergence, timing, error status, and
sparse-design diagnostics when applicable.
diagnostic_oc: optional replication-by-facet fit/separation operating
characteristics when include_diagnostics = TRUE.
diagnostic_oc_summary: optional facet-level diagnostic operating-
characteristic summary.
settings: fitting and simulation settings.
ademp: simulation-study metadata.
Build a simulation specification with build_mfrm_sim_spec() or pass scalar
generator arguments directly.
Run evaluate_mfrm_recovery(...) with a modest reps value for a smoke
check, then increase reps for stable Monte Carlo summaries.
Inspect summary(x)$recovery_summary and the row-level x$recovery table.
simulate_mfrm_data(), evaluate_mfrm_design(), fit_mfrm()
rec <- evaluate_mfrm_recovery(
n_person = 12,
n_rater = 2,
n_criterion = 2,
reps = 1,
maxit = 30,
seed = 123
)
summary(rec)$recovery_summary[, c("ParameterType", "Facet", "RMSE", "Bias")]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.