R² = 0.87 # Standard errors: OLS # - # Est. Library ( ggplot2 ) data ( cars ) fitc <- lm ( cty ~ year + cyl * displ + class + fl + drv, data = mpg ) summ ( fitc ) # MODEL INFO: # Observations: 234 # Dependent Variable: cty # Type: OLS linear regression # MODEL FIT: # F(16,217) = 99.73, p = 0.00 # R² = 0.88 # Adj. If your moderator is a factor, each level will be plotted and you should leave modx.values = NULL, the default. You may also choose "terciles" to split the data into three equal-sized groups - representing the upper, middle, and lower thirds of the distribution of the moderator - and get the line that represents the median of the moderator within each of those groups. If you specify modx.values = "plus-minus", the mean of the moderator is not plotted, just the two +/- SD lines. You can choose specific variables by providing their names in a vector to the centered argument.īy default, with a continuous moderator you get three lines - 1 standard deviation above and below the mean and the mean itself. You can disable that by adding centered = "none". Keep in mind that the default behavior of interact_plot is to mean-center all continuous variables not involved in the interaction so that the predicted values are more easily interpreted. Interact_plot ( fiti, pred = Illiteracy, modx = Murder ) It’s worth recalling that you shouldn’t focus too much on the main effects of terms included in the interaction since they are conditional on the other variable(s) in the interaction being held constant at 0. Our interaction term is significant, suggesting some more probing is warranted to see what’s going on. ![]() ![]() R² = 0.44 # Standard errors: OLS # - # Est. Library ( jtools ) # for summ() states <- as.ame ( state.x77 ) fiti <- lm ( Income ~ Illiteracy * Murder + `HS Grad`, data = states ) summ ( fiti ) # MODEL INFO: # Observations: 50 # Dependent Variable: Income # Type: OLS linear regression # MODEL FIT: # F(4,45) = 10.65, p = 0.00 # R² = 0.49 # Adj.
0 Comments
Leave a Reply. |