View source: R/print_summary_stdmod.R
print.summary.std_selected | R Documentation |
Print the summary generated by summary()
on the output
of std_selected()
or std_selected_boot()
.
## S3 method for class 'summary.std_selected'
print(
x,
...,
est_digits = 4,
t_digits = 4,
pvalue_less_than = 0.001,
default_style = FALSE
)
x |
The output of |
... |
Arguments to be passed to |
est_digits |
The number of digits
after the decimal to be displayed for
the coefficient estimates, their
standard errors, and bootstrap
confidence intervals (if present). Note
that the values will be rounded to
this number of digits before printing.
If all digits at this position are
zero for all values, the values may
be displayed with fewer digits.
Note that the coefficient table is
printed by |
t_digits |
The number of digits
after the decimal to be displayed
for the t statistic (in the column
|
pvalue_less_than |
If a p-value
is less than this value, it will be
displayed with |
default_style |
Logical. If
|
x
is returned invisibly.
Shu Fai Cheung https://orcid.org/0000-0002-9871-9448
# Load a sample data set
dat <- test_x_1_w_1_v_1_cat1_n_500
# Do a moderated regression by lm
lm_raw <- lm(dv ~ iv*mod + v1 + cat1, dat)
# Standardize all variables except for categorical variables.
# Interaction terms are formed after standardization.
lm_std <- std_selected(lm_raw, to_scale = ~ .,
to_center = ~ .)
summary(lm_std)
# With bootstrapping
# nboot = 100 just for illustration. nboot >= 2000 should be used in read
# research.
lm_std_boot <- std_selected_boot(lm_raw, to_scale = ~ .,
to_center = ~ .,
nboot = 100)
summary(lm_std_boot)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.