print.summary.std_selected {stdmod}R Documentation

Print the Summary of a 'std_selected' Class Object

Description

Print the summary generated by summary() on the output of std_selected() or std_selected_boot().

Usage

## S3 method for class 'summary.std_selected'
print(
  x,
  ...,
  est_digits = 4,
  t_digits = 4,
  pvalue_less_than = 0.001,
  default_style = FALSE
)

Arguments

x

The output of summary().

...

Arguments to be passed to summary().

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 stats::printCoefmat(). If some numbers are vary large, the number of digits after the decimal may be smaller than est_digits due to a limit on the column width. This value also determines the number of digits for displayed R-squared if default_style is FALSE. Default if 4.

t_digits

The number of digits after the decimal to be displayed for the t statistic (in the column "t value"). This value also determines the number of digits for the F statistic for the R-squared if default_style is FALSE. Default is 4.

pvalue_less_than

If a p-value is less than this value, it will be displayed with ⁠"<(this value)".⁠ For example, if pvalue_less_than is .001, the default, p-values less than .001 will be displayed as ⁠<.001⁠. This value also determines the printout of the p-value of the F statistic if default_style is FALSE. (This argument does what eps.Pvalue does in stats::printCoefmat().)

default_style

Logical. If FALSE, the default, R-squared and F statistic will be displayed in a more readable style. If TRUE, then the default style in the printout of the summary of lm() output will be used.

Value

x is returned invisibly.

Author(s)

Shu Fai Cheung https://orcid.org/0000-0002-9871-9448

Examples


# 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)


[Package stdmod version 0.2.10 Index]