print.cond_effect {stdmod}R Documentation

Print a 'cond_effect' Class Object

Description

Print the output of cond_effect() or cond_effect_boot().

Usage

## S3 method for class 'cond_effect'
print(
  x,
  nd = 3,
  nd_stat = 3,
  nd_p = 3,
  title = TRUE,
  model = TRUE,
  level_info = TRUE,
  standardized = TRUE,
  boot_info = TRUE,
  table_only = FALSE,
  t_ci = FALSE,
  t_ci_level = 0.95,
  ...
)

Arguments

x

The output of cond_effect() or cond_effect_boot().

nd

The number of digits for the variables.

nd_stat

The number of digits for test statistics (e.g., t).

nd_p

The number of digits for p-values.

title

If TRUE, print a title. Default is TRUE.

model

If TRUE, print the regression model. Default is TRUE.

level_info

If TRUE, print information for interpreting the levels of the moderator, such as the values of the levels and distance from the mean. Default is TRUE.

standardized

If TRUE and one or more variables are standardized, report it. Default is TRUE.'

boot_info

If TRUE and bootstrap estimates are in x, print information about the bootstrapping, such as the number of bootstrap samples. Default is TRUE.

table_only

If TRUE, will suppress of other elements except for the table of conditional effects. Override arguments such as title, model, and level_info.

t_ci

If TRUE, will print the confidence intervals based on t statistics. These confidence intervals should not be used if some variables are standardized.

t_ci_level

The level of confidence of the confidence intervals based on t statistics. Default is .95.

...

Additional arguments. Ignored by this function.

Value

x is returned invisibility.

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)

cond_effect(lm_raw, x = iv, w = mod)

lm_std <- std_selected(lm_raw, to_scale = ~ iv + mod,
                               to_center = ~ iv + mod)

cond_effect(lm_std, x = iv, w = mod)


[Package stdmod version 0.2.10 Index]