simple_slopes_analysis_logistic function

Simple slopes analysis with logistic regression analyses

Simple slopes analysis with logistic regression analyses

Conduct a simple slopes analysis with logistic regression analyses, typically to probe a two-way interaction when the dependent variable is binary.

simple_slopes_analysis_logistic( data = NULL, iv_name = NULL, dv_name = NULL, mod_name = NULL, round_b = 2, round_se = 2, round_z = 2, round_p = 3, focal_values = NULL )

Arguments

  • data: a data object (a data frame or a data.table)
  • iv_name: name of the independent variable (IV)
  • dv_name: name of the dependent variable (DV)
  • mod_name: name of the moderator variable (MOD)
  • round_b: number of decimal places to which to round coefficients from the regression analysis (default = 2)
  • round_se: number of decimal places to which to round standard error values from the regression analysis (default = 2)
  • round_z: number of decimal places to which to round t statistics from the regression analysis (default = 2)
  • round_p: number of decimal places to which to round p values from the regression analysis (default = 2)
  • focal_values: this input will be used only in cases where MOD is continuous. In such cases, what are the focal values of the MOD at which to estimate the effect of IV on DV? By default, values corresponding to the mean of MOD, and mean of MOD +/-1 SD will be used.

Examples

simple_slopes_analysis_logistic( data = mtcars, iv_name = "vs", dv_name = "am", mod_name = "hp") simple_slopes_analysis_logistic( data = mtcars, iv_name = "disp", dv_name = "am", mod_name = "hp")