% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/export.R
\name{save_person_plots}
\alias{save_person_plots}
\title{Save a kidmap for every person}
\usage{
save_person_plots(
  fit,
  file,
  persons = NULL,
  level = 0.95,
  width = 8,
  height = 6,
  dpi = 300
)
}
\arguments{
\item{fit}{A fitted object from \code{\link{rasch}}.}

\item{file}{Output path ending in \code{.pdf} (one page per person) or
\code{.zip} (one PNG per person).}

\item{persons}{Row numbers or IDs; all estimated persons by default.}

\item{level}{Confidence level of the band marking unexpected responses.}

\item{width, height, dpi}{Device size in inches and PNG resolution.}
}
\value{
Invisibly, the output path.
}
\description{
Writes one kidmap (\code{\link{plot_kidmap}}) per person to a single
multi-page PDF or a ZIP archive of PNGs, chosen by the extension of
\code{file}. Persons without a location estimate are skipped.
}
\examples{
set.seed(1)
d <- seq(-2, 2, length.out = 6)
X <- matrix(rbinom(60 * 6, 1, plogis(outer(rnorm(60), d, "-"))), 60, 6)
colnames(X) <- paste0("I", 1:6)
f <- rasch(X)
save_person_plots(f, file.path(tempdir(), "kidmaps.pdf"), persons = 1:5)
}
