View source: R/recommended_n.R
| recommended_n | R Documentation |
Given a summary.irt_results() object, find the smallest sample size
at which a performance criterion meets the specified threshold for
each item and parameter combination.
recommended_n(object, ...)
## S3 method for class 'summary_irt_results'
recommended_n(object, criterion, threshold, param = NULL, item = NULL, ...)
object |
A |
... |
Additional arguments (ignored). |
criterion |
Character string. Which criterion to evaluate.
One of: |
threshold |
Positive numeric. The threshold value the criterion must meet. |
param |
Optional character vector. Filter to specific parameter
types (e.g., |
item |
Optional integer vector. Filter to specific item numbers. |
For criteria where smaller is better (bias, empirical_se, mse, rmse, mcse_bias, mcse_mse), the threshold is met when the criterion value is at or below the threshold. For bias, the absolute value is used. For coverage (where higher is better), the threshold is met when coverage is at or above the threshold.
A data frame with columns:
Item number.
Parameter name.
Minimum sample size meeting the threshold,
or NA if no tested sample size meets it.
The criterion used (echoed back for reference).
The threshold used (echoed back for reference).
summary.irt_results() for computing criteria,
plot.irt_results() for visualization.
design <- irt_design(
model = "1PL", n_items = 5,
item_params = list(b = seq(-2, 2, length.out = 5))
)
study <- irt_study(design, sample_sizes = c(200, 500))
results <- irt_simulate(study, iterations = 10, seed = 42)
s <- summary(results)
# Minimum N for RMSE <= 0.20 on all items
recommended_n(s, criterion = "rmse", threshold = 0.20)
# Minimum N for 95% coverage on difficulty parameters only
recommended_n(s, criterion = "coverage", threshold = 0.95, param = "b")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.