Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: "mfx, predict at(...)" evaluated at CONDITIONAL means?


From   Eva Poen <[email protected]>
To   [email protected]
Subject   Re: st: "mfx, predict at(...)" evaluated at CONDITIONAL means?
Date   Sun, 15 Mar 2009 16:09:46 +0000

Christoph,

I haven't had a closer look, but I think there is a very simple
solution for your problem: you can simply use an if condition with
-mfx-. Here is an example using the auto data:

****
sysuse auto
probit foreign mpg rep78 weight

* marginal effects at conditional means of mpg and weight if rep78==3:
mfx compute if rep78==3

* check if the last column really contains conditional means:
sum mpg weight if e(sample) & rep78==3
****

I quickly checked Martin's solution, and it comes to the same results.

Hope this helps,
Eva



2009/3/15 Christoph Carl Basten <[email protected]>:
> Hi,
>
> when estimating the marginal effects (using e.g. "mfx") after a Probit
> regression, I'd like to set one value (age) to a representative value, say
> 50 years, and have all other variables at the /conditional/ mean for those
> aged 50.
>
> From what I understand, if I specify only   "mfx, predict at(age=50), Stata
> will set all other variables to the /population/ means, so the only way to
> have them set at the means conditional on age=50 would be to compute all
> these conditional means by hand and then specifying them manually in the
> atlist.
>
> But is there any option to tell Stata that I want age=50 and e.th. else at
> the conditional means?
>
> Thanks for your consideration and best regards,
> Christoph
>
>

*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index