% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/print_results.R
\name{results_table}
\alias{results_table}
\title{Create a formatted results table for multiple models}
\usage{
results_table(
  ...,
  model_names = NULL,
  digits = 3,
  se_format = c("parentheses", "brackets", "below"),
  include_loglik = TRUE,
  include_n = TRUE,
  stars = TRUE
)
}
\arguments{
\item{...}{One or more factorana_result objects, or a list of them}

\item{model_names}{Optional character vector of model names for column headers}

\item{digits}{Number of decimal places (default 3)}

\item{se_format}{How to display standard errors: "parentheses" (default),
"brackets", or "below"}

\item{include_loglik}{Include log-likelihood row (default TRUE)}

\item{include_n}{Include number of observations (default TRUE)}

\item{stars}{Add significance stars (default TRUE)}
}
\value{
A data frame with the formatted table
}
\description{
Creates a table comparing estimates across multiple models, with standard
errors in parentheses below each estimate.
}
\examples{
\donttest{
# Estimate a small one-factor model and format the result as a table
set.seed(1); n <- 200
f <- rnorm(n)
dat <- data.frame(intercept = 1,
                  y1 = 1.0 * f + rnorm(n, 0, 0.5),
                  y2 = 0.8 * f + rnorm(n, 0, 0.5))
fm <- define_factor_model(n_factors = 1)
mc1 <- define_model_component("m1", dat, "y1", fm,
  covariates = "intercept", model_type = "linear",
  loading_normalization = 1)
mc2 <- define_model_component("m2", dat, "y2", fm,
  covariates = "intercept", model_type = "linear",
  loading_normalization = NA_real_)
ms <- define_model_system(components = list(mc1, mc2), factor = fm)
ctrl <- define_estimation_control(n_quad_points = 8, num_cores = 1)
fit <- estimate_model_rcpp(ms, dat, control = ctrl,
  optimizer = "nlminb", parallel = FALSE, verbose = FALSE)

results_table(fit, model_names = "Baseline")
}
}
