% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/api-tables.R
\name{write_mfrm_subset_file}
\alias{write_mfrm_subset_file}
\title{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{
\item{fit}{Output from \code{\link[=fit_mfrm]{fit_mfrm()}}.}

\item{diagnostics}{Optional output from \code{\link[=diagnose_mfrm]{diagnose_mfrm()}}. Supplying it
avoids recomputing subset connectivity.}

\item{path}{Output file path for the subset summary table.}

\item{node_path}{Optional output file path for the node-level subset table.
When \code{NULL} and \code{include_nodes = TRUE}, a sibling file ending in
\verb{_nodes.csv} or \verb{_nodes.tsv} is created.}

\item{format}{File format: \code{"csv"} or \code{"tsv"}. If omitted, inferred from
\code{path} when the extension is \code{.csv} or \code{.tsv}, otherwise \code{"csv"}.}

\item{digits}{Rounding digits for numeric columns.}

\item{overwrite}{If \code{FALSE}, existing files are not overwritten.}

\item{include_nodes}{If \code{TRUE}, also write the node-level facet/level to
subset membership table.}
}
\value{
A bundle with \code{table}, \code{nodes}, \code{summary}, \code{written_files}, and
\code{settings}.
}
\description{
Write standalone subset-connectivity files
}
\details{
Subsets are connected components in the observation design graph. The graph
links \code{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.
}
\examples{
\donttest{
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
}
}
\seealso{
\code{\link[=diagnose_mfrm]{diagnose_mfrm()}}, \code{\link[=subset_connectivity_report]{subset_connectivity_report()}},
\code{\link[=write_mfrm_residual_file]{write_mfrm_residual_file()}}
}
