Closed pbreheny closed 8 years ago
As far as how to visualize higher-order (3+) interactions, there is no explicit functionality in visreg to accomplish this, but you can piece together what I would consider an acceptable model visualization with a few separate calls to visreg using different 'cond' arguments.
For example, suppose we fit the model
fit <- lm(Ozone ~ Solar.R*Wind*Temp, data=airquality)
We can then construct two separate plots:
visreg(fit, 'Wind', by='Temp', cond=list(Solar.R=100), layout=c(3,1))
visreg(fit, 'Wind', by='Temp', cond=list(Solar.R=300), layout=c(3,1))
The first plot represents what the Wind x Temp interaction looks like for a solar radiation level of 100, the second depicts what the Wind x Temp interaction looks like for a solar radiation level of 300.
I'll be the first to admit that, for a variety of reasons, this is not as good as having visreg automatically handle higher-order interactions. Improving support for higher-order interactions is on my to-do list as far as future improvements for visreg, but I've been busy with other, non-visreg things lately.
Hi that pretty much is a perfect work around! many many thanks!
Jens Oldeland (University of Hamburg) writes: