% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{get_inlavaan_internal}
\alias{get_inlavaan_internal}
\title{Extract the Internal INLAvaan Object}
\usage{
get_inlavaan_internal(object, what)
}
\arguments{
\item{object}{An object of class \link{INLAvaan}.}

\item{what}{Character. Name of the element to extract from the internal
list. If missing, the entire list is returned. Common elements include
\code{"coefficients"}, \code{"summary"}, \code{"Sigma_theta"}, \code{"vcov_x"},
\code{"theta_star"}, \code{"approx_data"}, \code{"pdf_data"}, \code{"partable"},
\code{"marginal_method"}, \code{"nsamp"}, \code{"mloglik"}, \code{"DIC"}, \code{"ppp"},
\code{"vb"}, \code{"opt"}, \code{"timing"}, \code{"visual_debug"}.}
}
\value{
The full \code{inlavaan_internal} list, or the named element when
\code{what} is supplied.
}
\description{
Returns the \code{inlavaan_internal} list stored inside a fitted \link{INLAvaan}
object, optionally extracting a single named element.
}
\examples{
\donttest{
HS.model <- "
  visual  =~ x1 + x2 + x3
  textual =~ x4 + x5 + x6
  speed   =~ x7 + x8 + x9
"
utils::data("HolzingerSwineford1939", package = "lavaan")
fit <- acfa(HS.model, HolzingerSwineford1939, std.lv = TRUE, nsamp = 100,
            test = "none", verbose = FALSE)

# Full internal object
int <- get_inlavaan_internal(fit)
names(int)

# Extract a specific element
get_inlavaan_internal(fit, "coefficients")
}

}
\seealso{
\link[=INLAvaan-class]{INLAvaan}, \code{\link[=diagnostics]{diagnostics()}}, \code{\link[=timing]{timing()}}
}
