[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Predictions after -intreg-

From   "Mentzakis, Emmanouil" <>
To   <>
Subject   st: Predictions after -intreg-
Date   Mon, 26 May 2008 16:55:08 +0100

Dear all, 

After the use of -intreg- I want to predict the probabilities and the
conditional expected values. Although they are directly calculated
through the -pr(lb, ub)- and -e(lb, ub)- options, no standard errors are

Below I have attached some code for their manual calculation and I would
be grateful if anyone could help with the calculation of standard

I am not sure if it is possible with -nlcom- or -predictnl- since the
calculation takes place in three separate lines due to the left and
right censored values.

Thanks a lot

****************   Example   ********************   
webuse intregxmpl   
intreg wage1 wage2 age age2 tenure   
predict xb ,xb   
predict ye if e(sample),e(wage1, wage2)   
predict pr if e(sample),pr(wage1, wage2)   
local l2 ((wage2-xb)/e(sigma))  
local l1((wage1-xb)/e(sigma))   
gen mpr=normal(`l2')-normal(`l1')   
replace mpr=normal(`l2') if wage1==.    
replace mpr=1-normal(`l1') if wage2==.   
sum pr mpr   
local nden (normalden(`l2')-normalden(`l1'))   
local ncum (normal(`l2')-normal(`l1'))   
gen mye = xb + e(sigma)*(`nden'/-`ncum')   
replace mye = xb + e(sigma)*(normalden(`l2')/-normal(`l2')) if wage1==.

replace mye = xb + e(sigma)*((-normalden(`l1'))/-(1 - normal`l1')) if
sum ye mye   


The University of Aberdeen is a charity registered in Scotland, No SC013683.

*   For searches and help try:

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