Dear all,
I am a bit confused about the syntax of margins.
I have a model where I interact a categorical variable, say cat, with
a continuous variable say cont. For simplicity assume cat has 3
levels.
The command would generically look like
command depvar i.cat cont i.cat#c.cont
I want to obtain the marginal effects of
cat2
cat3
cont
cat2#cont
cat3#cont
However, when i run margins as
margins , dydx(cat cont)
I obtain the overall average marginal effects for each variable
(averaging out the interaction)
if i run
margins cat , dydx(cont)
i obtain what it seems to be the average marginal effects for
different levels of cat, i.e. cat2#cont cat3#cont
But then how to obtain the marginal effects for cat2 and cat2 (i.e.
when cont==0)?
Thanks for any advice,
robert
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/