Dear all, I'd like to plot the marginal effect of a variable in a multiplicative interaction regression, that is, the effect of a variable conditional on the values of another variable. As an illustration, given model lm1 lm1 <- lm(y ~ x*z) I'd like to get the effects of x on y conditional on the values of z, with the corresponding confidence intervals if possible. Does anyone know of any package or simple way to do this? Thanks -- View this message in context: http://r.789695.n4.nabble.com/Marginal-effects-from-interaction-regression-model-tp2301858p2301858.html Sent from the R help mailing list archive at Nabble.com.
David Winsemius
2010-Jul-26 03:12 UTC
[R] Marginal effects from interaction regression model
On Jul 25, 2010, at 10:24 PM, Guillem R. wrote:> > Dear all, > > I'd like to plot the marginal effect of a variable in a multiplicative > interaction regression, that is, the effect of a variable > conditional on the > values of another variable. As an illustration, given model lm1 > > lm1 <- lm(y ~ x*z)? predict Perhaps: predict(lm1, newdata=data.frame(x=1:10, z=5), interval="confidence")> > I'd like to get the effects of x on y conditional on the values of > z, with > the corresponding confidence intervals if possible. Does anyone know > of any > package or simple way to do this? > > Thanks-- David Winsemius, MD West Hartford, CT
Reasonably Related Threads
- Comparing two regression slopes
- How to test for significance of random effects?
- as.formula and lme ( Fixed effects: Error in as.vector(x, "list") : cannot coerce to vector)
- as.formula and lme ( Fixed effects: Error in as.vector(x, "list") : cannot coerce to vector)
- test the significances of two regression lines