| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/survey.R |
| 3 |
\name{glance.svyglm} |
| 4 |
\alias{glance.svyglm} |
| 5 |
\title{Glance at a(n) svyglm object} |
| 6 |
\usage{ |
| 7 |
\method{glance}{svyglm}(x, maximal = x, ...) |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{x}{A \code{svyglm} object returned from \code{\link[survey:svyglm]{survey::svyglm()}}.} |
| 11 |
|
| 12 |
\item{maximal}{A \code{svyglm} object corresponding to the maximal |
| 13 |
model against which to compute the BIC. See Lumley and Scott |
| 14 |
(2015) for details. Defaults to \code{x}, which is equivalent |
| 15 |
to not using a maximal model.} |
| 16 |
|
| 17 |
\item{...}{Additional arguments. Not used. Needed to match generic |
| 18 |
signature only. \strong{Cautionary note:} Misspelled arguments will be |
| 19 |
absorbed in \code{...}, where they will be ignored. If the misspelled |
| 20 |
argument has a default value, the default value will be used. |
| 21 |
For example, if you pass \code{conf.lvel = 0.9}, all computation will |
| 22 |
proceed using \code{conf.level = 0.95}. Two exceptions here are: |
| 23 |
\itemize{ |
| 24 |
\item \code{tidy()} methods will warn when supplied an \code{exponentiate} argument if |
| 25 |
it will be ignored. |
| 26 |
\item \code{augment()} methods will warn when supplied a \code{newdata} argument if it |
| 27 |
will be ignored. |
| 28 |
}} |
| 29 |
} |
| 30 |
\description{ |
| 31 |
Glance accepts a model object and returns a \code{\link[tibble:tibble]{tibble::tibble()}} |
| 32 |
with exactly one row of model summaries. The summaries are typically |
| 33 |
goodness of fit measures, p-values for hypothesis tests on residuals, |
| 34 |
or model convergence information. |
| 35 |
|
| 36 |
Glance never returns information from the original call to the modeling |
| 37 |
function. This includes the name of the modeling function or any |
| 38 |
arguments passed to the modeling function. |
| 39 |
|
| 40 |
Glance does not calculate summary measures. Rather, it farms out these |
| 41 |
computations to appropriate methods and gathers the results together. |
| 42 |
Sometimes a goodness of fit measure will be undefined. In these cases |
| 43 |
the measure will be reported as \code{NA}. |
| 44 |
|
| 45 |
Glance returns the same number of columns regardless of whether the |
| 46 |
model matrix is rank-deficient or not. If so, entries in columns |
| 47 |
that no longer have a well-defined value are filled in with an \code{NA} |
| 48 |
of the appropriate type. |
| 49 |
} |
| 50 |
\examples{ |
| 51 |
\dontshow{if (rlang::is_installed("survey")) withAutoprint(\{ # examplesIf} |
| 52 |
|
| 53 |
# load libraries for models and data |
| 54 |
library(survey) |
| 55 |
|
| 56 |
set.seed(123) |
| 57 |
data(api) |
| 58 |
|
| 59 |
# survey design |
| 60 |
dstrat <- |
| 61 |
svydesign( |
| 62 |
id = ~1, |
| 63 |
strata = ~stype, |
| 64 |
weights = ~pw, |
| 65 |
data = apistrat, |
| 66 |
fpc = ~fpc |
| 67 |
) |
| 68 |
|
| 69 |
# model |
| 70 |
m <- svyglm( |
| 71 |
formula = sch.wide ~ ell + meals + mobility, |
| 72 |
design = dstrat, |
| 73 |
family = quasibinomial() |
| 74 |
) |
| 75 |
|
| 76 |
glance(m) |
| 77 |
\dontshow{\}) # examplesIf} |
| 78 |
} |
| 79 |
\references{ |
| 80 |
Lumley T, Scott A (2015). AIC and BIC for modelling with complex |
| 81 |
survey data. \emph{Journal of Survey Statistics and Methodology}, 3(1). |
| 82 |
} |
| 83 |
\seealso{ |
| 84 |
\code{\link[survey:svyglm]{survey::svyglm()}}, \code{\link[stats:glm]{stats::glm()}}, \link[survey:anova.svyglm]{survey::anova.svyglm} |
| 85 |
|
| 86 |
Other lm tidiers: |
| 87 |
\code{\link{augment.glm}()}, |
| 88 |
\code{\link{augment.lm}()}, |
| 89 |
\code{\link{glance.glm}()}, |
| 90 |
\code{\link{glance.lm}()}, |
| 91 |
\code{\link{glance.summary.lm}()}, |
| 92 |
\code{\link{tidy.glm}()}, |
| 93 |
\code{\link{tidy.lm}()}, |
| 94 |
\code{\link{tidy.lm.beta}()}, |
| 95 |
\code{\link{tidy.mlm}()}, |
| 96 |
\code{\link{tidy.summary.lm}()} |
| 97 |
} |
| 98 |
\concept{lm tidiers} |
| 99 |
\value{ |
| 100 |
A \code{\link[tibble:tibble]{tibble::tibble()}} with exactly one row and columns: |
| 101 |
\item{AIC}{Akaike's Information Criterion for the model.} |
| 102 |
\item{BIC}{Bayesian Information Criterion for the model.} |
| 103 |
\item{deviance}{Deviance of the model.} |
| 104 |
\item{df.null}{Degrees of freedom used by the null model.} |
| 105 |
\item{df.residual}{Residual degrees of freedom.} |
| 106 |
\item{null.deviance}{Deviance of the null model.} |
| 107 |
|
| 108 |
} |