Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 72786

Is there an equivalent command to 'predict' for a Heckman probit regression?

$
0
0
Hello all,

I am just wondering if there is an equivalent command to 'predict' for probit regressions?

Maarten Buis kindly gave an answer to a previous question I had here - http://www.statalist.org/forums/foru...argins-command

He gave me this code:

Code:
 // some data preparation sysuse nlsw88, clear
gen byte marst = !never_married + married
label variable marst "marital status" label define marst 0 "never married"     ///                    
                                                                              1 "divorced/widowed"  ///                    
                                                                              2 "married"
label value marst marst  
gen byte ed = cond(grade <  12, 0,       ///              
                     cond(grade == 12, 1,       ///              
                     cond(grade <  16, 2, 3 ))) ///              
                     if grade < .
label variable ed "education"
label define ed 0 "< highschool" ///                
                     1 "highschool"   ///                
                     2 "some college" ///                
                     3 "college"
label value ed ed  

label define south 1 "south" ///                    
                          0 "non-south"
label value south south 

// the model
probit union i.marst i.race i.south i.ed  
// make the table margins i.marst#i.race#i.south#i.ed
Obviously, margins gives you the prediction probabilities, however, I would like to go one step further and do what the predict command does for linear regression and that is insert the predicted probabilities into the dataset. Thanks!

Viewing all articles
Browse latest Browse all 72786

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>