% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/glm-clean.R
\name{clean}
\alias{clean}
\title{Tidy a Survey GLM Fit}
\usage{
clean(
  model,
  conf_level = 0.95,
  include_reference = TRUE,
  n = FALSE,
  statistic = TRUE,
  exponentiate = FALSE,
  interaction_sep = " * ",
  ...
)
}
\arguments{
\item{model}{A \code{survey_glm_fit} object from \code{\link[=survey_glm]{survey_glm()}}.}

\item{conf_level}{Numeric scalar in \verb{(0, 1)}. Confidence level for
confidence intervals. Default \code{0.95}.}

\item{include_reference}{Logical. If \code{TRUE}, reference levels for unordered
factor predictors appear as rows with \code{estimate = NA} and
\code{reference_row = TRUE}. Default \code{TRUE}.}

\item{n}{Logical. If \code{TRUE}, adds an \code{n_obs} column with the unweighted
observation count per term. Default \code{FALSE}.}

\item{statistic}{Logical. If \code{TRUE} (default), includes the \code{statistic}
(t-statistic) column. Set to \code{FALSE} to drop it.}

\item{exponentiate}{Logical. If \code{TRUE}, exponentiates \code{estimate},
\code{conf_low}, and \code{conf_high}. \code{std_error} is left on the log scale
(matching \code{broom} convention). Fires
\code{surveycore_warning_exponentiate_nonlog} when the model link is not
log-based. Default \code{FALSE}.}

\item{interaction_sep}{Character scalar. Separator for interaction term
labels. Default \code{" * "}.}

\item{...}{Currently unused.}
}
\value{
A \code{survey_glm_tidy} object: a tibble with S3 class
\code{c("survey_glm_tidy", "survey_result", "tbl_df", "tbl", "data.frame")}.
Metadata is accessed via \code{\link[=meta]{meta()}}.
}
\description{
Converts a \code{survey_glm_fit} object into a \code{survey_glm_tidy} result tibble
with one row per model coefficient (plus optional reference rows for factor
predictors), design-based standard errors, confidence intervals, and
structured metadata.
}
\examples{
d <- as_survey(gss_2024, ids = vpsu, weights = wtssps,
               strata = vstrat, nest = TRUE)
fit <- survey_glm(d, age ~ sex)
clean(fit)
clean(fit, conf_level = 0.99, exponentiate = FALSE)

}
\seealso{
\code{\link[=survey_glm]{survey_glm()}} to fit the model, \code{\link[=meta]{meta()}} to access metadata.

Other analysis: 
\code{\link{get_anova}()},
\code{\link{get_corr}()},
\code{\link{get_covariance}()},
\code{\link{get_diffs}()},
\code{\link{get_freqs}()},
\code{\link{get_means}()},
\code{\link{get_pairwise}()},
\code{\link{get_quantiles}()},
\code{\link{get_ratios}()},
\code{\link{get_t_test}()},
\code{\link{get_totals}()},
\code{\link{get_variance}()},
\code{\link{meta}()}
}
\concept{analysis}
