Learn R Programming

stdmod (version 0.2.11)

print.cond_effect: Print a 'cond_effect' Class Object

Description

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

Usage

# S3 method for 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,
  ...
)

Value

x is returned invisibility.

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.

Examples

Run this code

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

Run the code above in your browser using DataLab