write_mfrm_subset_file: Write standalone subset-connectivity files

View source: R/api-tables.R

write_mfrm_subset_fileR Documentation

Write standalone subset-connectivity files

Description

Write standalone subset-connectivity files

Usage

write_mfrm_subset_file(
  fit,
  diagnostics = NULL,
  path,
  node_path = NULL,
  format = c("csv", "tsv"),
  digits = 4,
  overwrite = FALSE,
  include_nodes = TRUE
)

Arguments

fit

Output from fit_mfrm().

diagnostics

Optional output from diagnose_mfrm(). Supplying it avoids recomputing subset connectivity.

path

Output file path for the subset summary table.

node_path

Optional output file path for the node-level subset table. When NULL and include_nodes = TRUE, a sibling file ending in ⁠_nodes.csv⁠ or ⁠_nodes.tsv⁠ is created.

format

File format: "csv" or "tsv". If omitted, inferred from path when the extension is .csv or .tsv, otherwise "csv".

digits

Rounding digits for numeric columns.

overwrite

If FALSE, existing files are not overwritten.

include_nodes

If TRUE, also write the node-level facet/level to subset membership table.

Details

Subsets are connected components in the observation design graph. The graph links Person and all modeled facet levels that co-occur in an observation. Multiple subsets mean the scale is not fully connected unless external anchoring or a deliberate separate-calibration design justifies it.

Value

A bundle with table, nodes, summary, written_files, and settings.

See Also

diagnose_mfrm(), subset_connectivity_report(), write_mfrm_residual_file()

Examples


toy <- load_mfrmr_data("example_core")
fit <- fit_mfrm(toy, "Person", c("Rater", "Criterion"), "Score",
                method = "JML", maxit = 30)
diag <- diagnose_mfrm(fit, residual_pca = "none")
path <- tempfile(fileext = ".csv")
out <- write_mfrm_subset_file(fit, diag, path, overwrite = TRUE)
out$written_files


mfrmr documentation built on June 13, 2026, 1:07 a.m.