This guide is written for intermediate R users who want to understand and modify mfrmr.
Read /R/api.R first.
fit_mfrm() is the entry point for estimation.diagnose_mfrm() builds diagnostics from a fitted model.analyze_residual_pca() / plot_residual_pca() handle residual PCA.estimate_bias() / build_fixed_reports() produce FACETS-style interaction reports.build_apa_outputs() / build_visual_summaries() produce narrative output.If you only need to use the package, you can stop at api.R + the vignettes.
Core numeric logic is in /R/mfrm_core.R.
mfrm_estimate() is intentionally structured in five stages:
Helper functions around mfrm_estimate() are separated so each stage can be debugged independently.
Input data is long format (one row = one rating event).
Required columns at runtime:
person argument)facets argument)score argument)weight argument)Packaged example datasets can be loaded via data() or load_mfrmr_data().
Diagnostics are computed in mfrm_diagnostics() (/R/mfrm_core.R).
Key components:
Text/report builders live in /R/reporting.R.
strict/standard/lenient) are resolved in one place to avoid hidden constants.Facet orientation is controlled by positive_facets.
positive_facets use +1-1This sign map is used consistently when converting between logits, fair averages, and report values.
If you need to change behavior:
mfrm_core.R around log-likelihood/optimization helpersreporting.Rapi.R and regenerate docsAfter changes, always run:
Rscript -e 'testthat::test_dir("mfrmr/tests/testthat")'R CMD build mfrmrR CMD check --no-manual mfrmr_0.1.0.tar.gzAny scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.