Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

psycModel (version 0.5.0)

simple_slope: Slope Estimate at Varying Level of Moderators

Description

[Stable]
The function uses the interaction::sim_slopes() to calculate the slope estimate at varying level of moderators (+/- 1 SD and mean). Additionally, it will produce a Johnson-Newman plot that shows when the slope estimate is not significant

Usage

simple_slope(model, data = NULL)

Value

a list with the slope estimate data frame and a Johnson-Newman plot.

Arguments

model

model object from lm, lme,lmer

data

data.frame

Examples

Run this code
fit <- lm_model(
  data = iris,
  response_variable = Sepal.Length,
  predictor_variable = dplyr::everything(),
  three_way_interaction_factor = c(Sepal.Width, Petal.Width, Petal.Length)
)

simple_slope_fit <- simple_slope(
  model = fit,
)

Run the code above in your browser using DataLab