summ
prints output for a regression model in a fashion similar to
summary
, but formatted differently with more options.
# S3 method for svyglm summ(model, scale = FALSE, confint = getOption("summconfint", FALSE), ci.width = getOption("summci.width", 0.95), digits = getOption("jtoolsdigits", default = 2), pvals = getOption("summpvals", TRUE), stars = getOption("summstars", FALSE), n.sd = 1, center = FALSE, transform.response = FALSE, exp = FALSE, vifs = getOption("summvifs", FALSE), model.info = getOption("summmodel.info", TRUE), model.fit = getOption("summmodel.fit", TRUE), which.cols = NULL, ...)
model  A 

scale  If 
confint  Show confidence intervals instead of standard errors? Default
is 
ci.width  A number between 0 and 1 that signifies the width of the
desired confidence interval. Default is 
digits  An integer specifying the number of digits past the decimal to
report in the output. Default is 2. You can change the default number of
digits for all jtools functions with

pvals  Show p values and significance stars? If 
stars  Show significance stars with p values? Default is FALSE. 
n.sd  If 
center  If you want coefficients for meancentered variables but don't
want to standardize, set this to 
transform.response  Should scaling/centering apply to response
variable? Default is 
exp  If 
vifs  If 
model.info  Toggles printing of basic information on sample size, name of DV, and number of predictors. 
model.fit  Toggles printing of model fit statistics. 
which.cols  Developmental feature. By providing columns by name, you can add/remove/reorder requested columns in the output. Not fully supported, for now. 
...  This just captures extra arguments that may only work for other types of models. 
If saved, users can access most of the items that are returned in the output (and without rounding).
The outputted table of variables and coefficients
The model for which statistics are displayed. This would be
most useful in cases in which scale = TRUE
.
By default, this function will print the following items to the console:
The sample size
The name of the outcome variable
The (Pseudo)Rsquared value and AIC.
A table with regression coefficients, standard errors, t values, and p values.
The scale
and center
options are performed via refitting
the model with scale_lm
and center_lm
,
respectively. Each of those in turn uses gscale
for the
meancentering and scaling. These functions can handle svyglm
objects
correctly by calling svymean
and svyvar
to compute means and
standard deviations. Weights are not altered. The fact that the model is
refit means the runtime will be similar to the original time it took to fit
the model.
scale_lm
can simply perform the standardization if
preferred.
gscale
does the heavy lifting for meancentering and scaling
behind the scenes.
if (requireNamespace("survey")) { library(survey) data(api) dstrat < svydesign(id = ~1, strata =~ stype, weights =~ pw, data = apistrat, fpc =~ fpc) regmodel < svyglm(api00 ~ ell * meals, design = dstrat) summ(regmodel) }#> MODEL INFO: #> Observations: 200 #> Dependent Variable: api00 #> Type: Surveyweighted linear regression #> #> MODEL FIT: #> R² = 0.66 #> Adj. R² = 0.65 #> #> Standard errors: Robust #> #>   Est. S.E. t val. p #> ::::: #> (Intercept)  836.62 10.99 76.10 0.00 #> ell  1.69 1.01 1.67 0.10 #> meals  3.32 0.28 11.99 0.00 #> ell:meals  0.02 0.01 1.42 0.16 #> #> Estimated dispersion parameter = 5118.85