Statalist


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

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


From   "Martin Weiss" <[email protected]>
To   [email protected]
Subject   Re: st: "mfx, predict at(...)" evaluated at CONDITIONAL means?
Date   Sun, 15 Mar 2009 15:50:54 +0100

<>

It is an interesting prob, and I cannot think of a built-in solution of the top of my head. If I wanted to conduct the whole thing manually, would I do like this?

********
sysuse auto, clear
probit foreign mpg weight price
mfx, at(mpg=30)

*auxiliary regressions
reg price mp
loc adjustedprice = _b[_cons]+_b[mpg]*30
reg weight mp
loc adjustedweight = _b[_cons]+_b[mpg]*30

*insert locals into -mfx- calculations
qui probit foreign mpg weight price
mfx, at(mpg=30 price=`adjustedprice' weight=`adjustedweight')
*********

I can see how one would turn this into a -program-, where you pass a separate -varlist- to Stata for the variables that should be set to their conditional mean...

HTH
Martin
-------- Original-Nachricht --------
> Datum: Sun, 15 Mar 2009 13:40:32 +0100
> Von: Christoph Carl Basten <[email protected]>
> An: [email protected]
> Betreff: st: "mfx, predict at(...)" evaluated at CONDITIONAL means?

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

-- 
Martin Weiss
Hackersteigle 3
72076 Tübingen
00497071/793535
00491784597218

Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01
*
*   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