% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/api-plotting.R
\name{as.data.frame.mfrm_fit}
\alias{as.data.frame.mfrm_fit}
\title{Convert mfrm_fit to a tidy data.frame}
\usage{
\method{as.data.frame}{mfrm_fit}(x, row.names = NULL, optional = FALSE, ...)
}
\arguments{
\item{x}{An \code{mfrm_fit} object from \code{\link{fit_mfrm}}.}

\item{row.names}{Ignored (included for S3 generic compatibility).}

\item{optional}{Ignored (included for S3 generic compatibility).}

\item{...}{Additional arguments (ignored).}
}
\value{
A data.frame with columns \code{Facet}, \code{Level},
\code{Estimate}, and \code{Extreme}. The \code{Extreme} column
is populated for person rows from the extreme-score flag added
in 0.1.6 (\code{"Min"} / \code{"Max"} / \code{NA}); non-person
facet rows carry \code{NA} in that column by design.
}
\description{
Returns all facet-level estimates (person and others) in a single
tidy data.frame. Useful for quick interactive export:
\code{write.csv(as.data.frame(fit), "results.csv")}.
}
\details{
This method returns four columns (\code{Facet}, \code{Level},
\code{Estimate}, \code{Extreme}) so that the result is easy to
inspect, join, or write to disk.
}
\section{Interpreting output}{

Person estimates are returned with \code{Facet = "Person"}.
All non-person facets are stacked underneath in the same schema.
}

\section{Typical workflow}{

\enumerate{
\item Fit a model with \code{\link{fit_mfrm}()}.
\item Convert with \code{as.data.frame(fit)} for a compact long-format export.
\item Join additional diagnostics later if you need SE or fit statistics.
}
}

\examples{
toy <- load_mfrmr_data("example_core")
fit <- fit_mfrm(toy, "Person", c("Rater", "Criterion"), "Score",
                method = "JML", model = "RSM", maxit = 30)
head(as.data.frame(fit))
}
\seealso{
\code{\link{fit_mfrm}}, \code{\link{export_mfrm}}
}
