Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Manual calculation of scale factors after tobit and/or truncreg [econometrics help]


From   Arne Risa Hole <[email protected]>
To   [email protected]
Subject   Re: st: Manual calculation of scale factors after tobit and/or truncreg [econometrics help]
Date   Sun, 14 Oct 2012 16:29:14 +0100

Hi Clara,

Here’s an example of how you can generate the equivalent of predict y,
ystar (ll, ul) “by hand”:

sysuse auto, clear
generate wgt=weight/100
tobit mpg wgt, ll(17) ul(24)

predict y1, ystar(17, 24)

predict xb, xb
gen a = (17-xb)/[sigma]_b[_cons]
gen b = (24-xb)/[sigma]_b[_cons]
gen y2 = 17*normal(a) + 24*(1-normal(b)) + (normal(b)-normal(a))*xb +
[sigma]_b[_cons]*(normalden(a)-normalden(b))

As you can see y1 and y2 are identical (except for rounding differences).

See Maddala (1983), p. 161, or Cong (2000) for the relevant formulas.

I hope this helps.

Arne

References

Cong, R. 2000. sg144: Marginal effects of the tobit model. Stata
Technical Bulletin 56: 27–34. Reprinted in Stata Technical Bulletin
Reprints, vol. 10, pp. 189–197. College Station, TX: Stata Press.
Available at http://www.stata.com/products/stb/journals/stb56.pdf.

Maddala, G.S. 1983. Limited Dependent and Qualitative Variables in
Econometrics, Cambridge.


On 12 October 2012 15:15, Clara Mukuria <[email protected]> wrote:
> Thanks Marteen. I can retrieve these values from STATA but stored estimates
> are for the linear prediction and I am not sure how to apply sigma in order
> to generate the equivalent of predict y, ystar (ll, ul). It's not a constant
> effect on the estimates so can't just be subtracted. I've seen several
> formulas on the net - most of which are to generate marginal effects - and
> all of which produce different values. I know Stata will do out-of-sample
> calculations but as I said, the people who will be using these values will
> not be using Stata.
>
>
> Maarten Buis said the following on 12/10/2012 12:55:
>
>> On Fri, Oct 12, 2012 at 12:36 PM, Clara Mukuria  wrote:
>>>
>>> Thanks Marteen. Its not the SE of the estimate I am after. Rather, its
>>> how
>>> to adjust the linear predictions from Tobit/truncreg to the expexted
>>> values
>>> conditional on either censoring (for Tobit) or truncation (for Truncreg).
>>> STATA does this automatically for you but I need to work out how to do it
>>> manually as the out of sample estimation  will not be done in STATA - nor
>>> will those doing these estimations have access to the original dataset.
>>
>>
>> Seems to me you are still looking for [sigma]_b[_cons]. Anyhow, Stata
>> (note: not STATA) will do out of sample estimation. You can save the
>> model without the data using -estimates save-. Others can open their
>> own dataset and than use -estimates use- to open your model, and than
>> they can use -predict- or whatever other post-estimation command they
>> want.
>>
>> Hope this helps,
>> Maarten
>>
>> ---------------------------------
>> Maarten L. Buis
>> WZB
>> Reichpietschufer 50
>> 10785 Berlin
>> Germany
>>
>> http://www.maartenbuis.nl
>> ---------------------------------
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/faqs/resources/statalist-faq/
>> *   http://www.ats.ucla.edu/stat/stata/
>
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index