summ()
prints output for a regression model in a fashion similar to
summary()
, but formatted differently with more options.
# S3 method for glm summ( model, scale = FALSE, confint = getOption("summconfint", FALSE), ci.width = getOption("summci.width", 0.95), robust = getOption("summrobust", FALSE), cluster = NULL, vifs = getOption("summvifs", FALSE), digits = getOption("jtoolsdigits", default = 2), exp = FALSE, pvals = getOption("summpvals", TRUE), n.sd = 1, center = FALSE, transform.response = FALSE, data = NULL, model.info = getOption("summmodel.info", TRUE), model.fit = getOption("summmodel.fit", TRUE), which.cols = NULL, vcov = 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 
robust  If not Default is This requires the 
cluster  For clustered standard errors, provide the column name of the cluster variable in the input data frame (as a string). Alternately, provide a vector of clusters. 
vifs  If 
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

exp  If 
pvals  Show p values? If 
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 
data  If you provide the data used to fit the model here, that data
frame is used to refit the model (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. 
vcov  You may provide your own variancecovariance matrix for the
regression coefficients if you want to calculate standard errors in
some way not accommodated by the 
...  Among other things, arguments are passed to 
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 chisquared test, (Pseudo)Rsquared value and AIC/BIC.
A table with regression coefficients, standard errors, z values, and p values.
There are several options available for robust
. The heavy
lifting is done by sandwich::vcovHC()
, where those are better
described.
Put simply, you may choose from "HC0"
to "HC5"
. Based on the
recommendation of the developers of sandwich, the default is set to
"HC3"
. Stata's default is "HC1"
, so that choice may be better
if the goal is to replicate Stata's output. Any option that is understood by
vcovHC()
will be accepted. Clusterrobust standard errors are
computed
if cluster
is set to the name of the input data's cluster variable
or is a vector of clusters.
The scale
and center
options are performed via
refitting
the model with scale_mod()
and center_mod()
,
respectively. Each of those in turn uses gscale()
for the
meancentering and scaling.
King, G., & Roberts, M. E. (2015). How robust standard errors expose methodological problems they do not fix, and what to do about it. Political Analysis, 23(2), 159–179. https://doi.org/10.1093/pan/mpu015
Lumley, T., Diehr, P., Emerson, S., & Chen, L. (2002). The Importance of the Normality Assumption in Large Public Health Data Sets. Annual Review of Public Health, 23, 151–169. https://doi.org/10.1146/annurev.publhealth.23.100901.140546
scale_mod()
can simply perform the standardization if
preferred.
gscale()
does the heavy lifting for meancentering and scaling
behind the scenes.
Other summ:
summ.lm()
,
summ.merMod()
,
summ.rq()
,
summ.svyglm()
## Dobson (1990) Page 93: Randomized Controlled Trial : counts < c(18,17,15,20,10,20,25,13,12) outcome < gl(3,1,9) treatment < gl(3,3) print(d.AD < data.frame(treatment, outcome, counts))#> treatment outcome counts #> 1 1 1 18 #> 2 1 2 17 #> 3 1 3 15 #> 4 2 1 20 #> 5 2 2 10 #> 6 2 3 20 #> 7 3 1 25 #> 8 3 2 13 #> 9 3 3 12glm.D93 < glm(counts ~ outcome + treatment, family = poisson) # Summarize with standardized coefficients summ(glm.D93, scale = TRUE)#> MODEL INFO: #> Observations: 9 #> Dependent Variable: counts #> Type: Generalized linear model #> Family: poisson #> Link function: log #> #> MODEL FIT: #> <U+03C7>²(4) = 5.45, p = 0.24 #> PseudoR² (CraggUhler) = 0.46 #> PseudoR² (McFadden) = 0.10 #> AIC = 56.76, BIC = 57.75 #> #> Standard errors: MLE #>  #> Est. S.E. z val. p #>      #> (Intercept) 3.04 0.17 17.81 0.00 #> outcome2 0.45 0.20 2.25 0.02 #> outcome3 0.29 0.19 1.52 0.13 #> treatment2 0.00 0.20 0.00 1.00 #> treatment3 0.00 0.20 0.00 1.00 #>  #> #> Continuous predictors are meancentered and scaled by 1 s.d.