[R] marginal effect lmer

Andigo Andreas.Goldberg at unige.ch
Mon Jul 23 16:42:49 CEST 2012


Dear John,

yes, the superscript shall say that the quadratic term of Catholicproportion
is included as well (plus the interaction terms with it). In my dataset the
quadratic Catholicproportion is already included as a variable of its own,
so it should be fine or do I have to use the syntax with "poly..." you
mentioned? If so how do I have to rewrite the command for the whole model?

Out of your description of the package I just tried the example you
mentioned for a lmer model, so I tried:

plot(effect("Catholic:Catholicproportion", m1), grid=TRUE)

The result are ten (dk why 10 and not just 1) little plots, which look
rather linear and not the curvilinear pattern it should be. 
So far I always calculated the marginal effects in Stata, which works fine
for rather simple hierarchical models. But when the models become more
complicated (more random effects, more interaction terms,..) Stata often
fails to calculate the models, so that I cannot use it for displaying the
marginal effects. Thats why I try to find a solution in R to calculate the
marginal effects exactly the same way as I do in Stata. In Stata I followed
the syntax by Brambor, Clark and Golder
(https://files.nyu.edu/mrg217/public/interaction.html). Now I just wonder if
there is a way to calculate the marginal effects in R exactly the same way
as they do in Stata?

Best,
Andigo



--
View this message in context: http://r.789695.n4.nabble.com/marginal-effect-lmer-tp4637421p4637452.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list