jacob-long / interactions

A comprehensive, user-friendly toolkit for visualizing and analyzing statistical interactions. A spinoff from the `jtools` package.
https://interactions.jacob-long.com
Other
128 stars 19 forks source link

Change Confidence Interval in interact_plot #73

Open JDenn0514 opened 1 year ago

JDenn0514 commented 1 year ago

I am using interact_plot to create interaction plots and want to change the size of the confidence interval. However, int.width is not changing the width of the confidence intervals. The images below show what is happening.

Looking below, we can see how the graph looks with int.width = 0.95 image

In the next image, we can see when I set the int.width = 0.4 image

In addition, here is the code used to create the graphs in the images.

# create the model object
model <- lm(mpg ~ cyl * hp, data = mtcars)

# create the interaction plot used in the first image, 95% confidence interval
interact_plot(model, pred = cyl, modx = hp, interval = TRUE, int.width = 0.95)

# create the interaction plot used in the second image, 40% confidence interval
interact_plot(model, pred = cyl, modx = hp, interval = TRUE, int.width = 0.4)
SarBearSchwartz commented 1 year ago

I am having the same issue. I have been successfully able to use the int.width option in the past, but it doesn’t seem to be working now.