View source: R/api-estimation.R
| audit_mfrm_anchors | R Documentation |
Audit and normalize anchor/group-anchor tables
audit_mfrm_anchors(
data,
person,
facets,
score,
anchors = NULL,
group_anchors = NULL,
weight = NULL,
rating_min = NULL,
rating_max = NULL,
keep_original = FALSE,
min_common_anchors = 5L,
min_obs_per_element = 30,
min_obs_per_category = 10,
noncenter_facet = "Person",
dummy_facets = NULL
)
data |
A data.frame in long format (one row per rating event). |
person |
Column name for person IDs. |
facets |
Character vector of facet column names. |
score |
Column name for observed score. |
anchors |
Optional anchor table (Facet, Level, Anchor). |
group_anchors |
Optional group-anchor table (Facet, Level, Group, GroupValue). |
weight |
Optional weight/frequency column name. |
rating_min |
Optional minimum category value. |
rating_max |
Optional maximum category value. |
keep_original |
Keep original category values. |
min_common_anchors |
Minimum anchored levels per linking facet used in
recommendations (default |
min_obs_per_element |
Minimum weighted observations per facet level used
in recommendations (default |
min_obs_per_category |
Minimum weighted observations per score category
used in recommendations (default |
noncenter_facet |
One facet to leave non-centered. |
dummy_facets |
Facets to fix at zero. |
Anchoring (also called "fixing" or scale linking) constrains selected parameter estimates to pre-specified values, placing the current analysis on a previously established scale. This is essential when comparing results across administrations, linking test forms, or monitoring rater drift over time.
This function applies the same preprocessing and key-resolution rules
as fit_mfrm(), but returns an audit object so constraints can be
checked before estimation. Running the audit first helps avoid
estimation failures caused by misspecified or data-incompatible
anchors.
Anchor types:
Direct anchors fix individual element measures to specific logit values (e.g., Rater R1 anchored at 0.35 logits).
Group anchors constrain the mean of a set of elements to a target value, allowing individual elements to vary freely around that mean.
When both types overlap for the same element, the direct anchor takes precedence.
Design checks verify that each anchored element has at least
min_obs_per_element weighted observations (default 30) and each
score category has at least min_obs_per_category (default 10).
These thresholds follow standard Rasch sample-size recommendations
(Linacre, 1994).
A list of class mfrm_anchor_audit with:
anchors: cleaned anchor table used by estimation
group_anchors: cleaned group-anchor table used by estimation
facet_summary: counts of levels, constrained levels, and free levels
design_checks: observation-count checks by level/category
thresholds: active threshold settings used for recommendations
issue_counts: issue-type counts
issues: list of issue tables
recommendations: package-native anchor guidance strings
issue_counts/issues: concrete data or specification problems.
facet_summary: constraint coverage by facet.
design_checks: whether anchor targets have enough observations.
recommendations: action items before estimation.
Build candidate anchors (e.g., with make_anchor_table()).
Run audit_mfrm_anchors(...).
Resolve issues, then fit with fit_mfrm().
fit_mfrm(), describe_mfrm_data(), make_anchor_table()
toy <- load_mfrmr_data("example_core")
anchors <- data.frame(
Facet = c("Rater", "Rater"),
Level = c("R1", "R1"),
Anchor = c(0, 0.1),
stringsAsFactors = FALSE
)
aud <- audit_mfrm_anchors(
data = toy,
person = "Person",
facets = c("Rater", "Criterion"),
score = "Score",
anchors = anchors
)
aud$issue_counts
summary(aud)
p_aud <- plot(aud, draw = FALSE)
class(p_aud)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.