% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/export.R
\name{save_outputs}
\alias{save_outputs}
\title{Save every output of a Rasch analysis to a folder}
\usage{
save_outputs(
  fit,
  dir,
  formats = c("png", "pdf"),
  width = 9,
  height = 6,
  dpi = 300,
  item_plots = TRUE
)
}
\arguments{
\item{fit}{A fitted object from \code{\link{rasch}}.}

\item{dir}{Output directory; created if absent.}

\item{formats}{Plot formats, any of \code{"png"} and \code{"pdf"}.}

\item{width, height}{Plot size in inches.}

\item{dpi}{PNG resolution; the default 300 is publication quality.}

\item{item_plots}{Also write the per-item plot set (one ICC, category curve,
threshold curve, and frequency chart per item).}
}
\value{
Invisibly, the vector of files written.
}
\description{
Writes all tables (item statistics, thresholds with standard errors, person
estimates including ID and factors, the score-to-measure table, residual
correlations, principal-component loadings, category frequencies, and DIF
results for every nominated factor) as CSV; every plot, including the
per-item characteristic, category, threshold, and frequency plots, as PNG
and optionally PDF; and a plain-text analysis summary.
}
\examples{
set.seed(1)
d <- seq(-2, 2, length.out = 6)
X <- matrix(rbinom(300 * 6, 1, plogis(outer(rnorm(300), d, "-"))), 300, 6)
colnames(X) <- paste0("I", 1:6)
out <- file.path(tempdir(), "rasch-out")
save_outputs(rasch(X), out, formats = "png", item_plots = FALSE)
}
