| RMdimResidualPCACutoff | R Documentation |
Parametric bootstrap producing an empirical upper percentile for the
largest eigenvalue from a PCA of standardized residuals under a correctly
fitting Rasch model. For each iteration the function resamples theta
values from the data-based estimates, simulates response data, refits the
appropriate Rasch model, and extracts the first-contrast eigenvalue.
Several upper-tail percentiles of the resulting distribution are returned;
the 99th percentile is reported as the suggested cutoff (matching the
convention used by RMlocdepQ3Cutoff).
RMdimResidualPCACutoff(
data,
iterations = 250,
parallel = TRUE,
n_cores = NULL,
verbose = FALSE,
seed = NULL
)
data |
A data.frame or matrix of item responses (0-based, non-negative integers). |
iterations |
Integer. Number of simulation iterations. Default |
parallel |
Logical. Use parallel processing via |
n_cores |
Integer or |
verbose |
Logical. Show a progress bar. Default |
seed |
Integer or |
Rule-of-thumb cutoffs for the first-contrast eigenvalue depend strongly on sample size, test length, and item-parameter spread; simulation-based cutoffs tailored to the data are more defensible (Chou & Wang, 2010).
The generating model uses CML item parameters (psychotools) and WLE person
locations. Per iteration: theta values are sampled with replacement from the
WLE estimates; response data are simulated under the model
(psychotools::rrm for dichotomous, partial-credit simulator for
polytomous); CML/WLE standardized residuals are computed (the same engine as
the observed analysis); prcomp() is run; the first-contrast eigenvalue is
recorded.
Iterations that fail (e.g., due to a degenerate simulated dataset where
some category isn't represented) are silently dropped. The iarm package
is not required.
A list with components:
resultsdata.frame: iteration, eigenvalue.
p95, p99, p995, p999Empirical percentiles of
eigenvalue.
maxThe largest simulated eigenvalue.
suggested_cutoffThe 99th percentile (p99) — pass this list
back into RMdimResidualPCA via cutoff = , or use
suggested_cutoff directly.
suggested_cutoff_percentileThe percentile used for
suggested_cutoff, currently always 99.
actual_iterationsNumber of successful iterations.
sample_nNumber of complete cases used.
item_namesCharacter vector of item names.
Chou, Y.-T., & Wang, W.-C. (2010). Checking dimensionality in item response models with principal component analysis on standardized residuals. Educational and Psychological Measurement, 70(5), 717-731. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1177/0013164410379322")}
RMdimResidualPCA
set.seed(1)
dat <- as.data.frame(
matrix(sample(0:1, 200 * 12, replace = TRUE), nrow = 200, ncol = 12)
)
colnames(dat) <- paste0("I", 1:12)
# Few iterations for a fast example; use 250+ in real analyses
bound <- RMdimResidualPCACutoff(dat, iterations = 50, parallel = FALSE, seed = 1)
bound$suggested_cutoff
RMdimResidualPCA(dat, cutoff = bound)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.