Skip to content
Prev 255465 / 398498 Next

Effects - plot the marginal effect

Dear Tomas,

Write the model as  

  mreg01 = lm(enep1 ~ enpres * proximity1), data=a90)

That is, it's not necessary to index a90 as a list since it's given as the data argument to lm, and doing so confuses the effect() function. Also, enpres*proximity1 will include both the enpres:proximity1 interaction and enpres + proximity1, which are marginal to the interaction.

Next, you must quote the name of the term for which you want to compute effects, thus "enpres:proximity1" in the call to effect().

Finally, effect() doesn't compute what are usually termed marginal effects. If you want more information about what it does, see the references given in ?effect.

I hope this helps,
 John

------------------------------------------------
John Fox
Sen. William McMaster Prof. of Social Statistics
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox/

On Thu, 31 Mar 2011 22:09:32 +0200
Tomii <diogenas at gmail.com> wrote: