Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: marginal effects in the censored ordered probit


From   Marina Mastrorillo <mm513@sussex.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: marginal effects in the censored ordered probit
Date   Mon, 29 Aug 2011 11:36:55 +0100

Hello,
 
I'm Marina. I used the do.file written by Edoardo (found online) to
estimate the impact of migration on education using a censored ordered
probit. Many thanks to Edoardo! 
 
Now I should estimate the marginal effects. Could please anyone help me,
or give me any suggestion? Thanks a lot. 
 
Best regards,
Marina   
 
 
 
PS: Below there are the exact commands I used.
 
/*define school attainment dependent variable*/
gen school0 =schooling==0 
gen school1 =schooling==1 
gen school2 =schooling==2 

gen school3 =schooling==3
gen school4 =schooling==4
gen school5 =schooling==5
 
 
gen unc=enrol==0 
//define uncensored observation: children not attending school

 
program define maxcens
args lnf1 theta1 cut1 cut2 cut3 cut4 cut5 
qui replace `lnf1' = unc* (ln(($ML_y1*normprob(`cut1'-`theta1'))+($ML_y2*
(normprob(`cut2'-`theta1')-normprob(`cut1'-`theta1')))+($ML_y3*
(normprob(`cut3'-`theta1')-normprob(`cut2'-`theta1')))+($ML_y4*
(normprob(`cut4'-`theta1')-normprob(`cut3'-`theta1')))+($ML_y5*
(normprob(`cut5'-`theta1')-normprob(`cut4'-`theta1')))+($ML_y6*
(1-normprob(`cut5' -`theta1')))))+ enrol* (ln(($ML_y1)+($ML_y2*
(1-normprob(`cut1'-`theta1')))+($ML_y3*
(1-normprob(`cut2'-`theta1')))+($ML_y4*
(1-normprob(`cut3'-`theta1')))+($ML_y5*
(1-normprob(`cut4'-`theta1')))+($ML_y6*(1-normprob(`cut5'-`theta1')))))
end
 
ml model lf maxcens (school0 school1 school2 school3 school4 school5 =
migcop sex age_head agesq_head num_hh sex_head years_05 years_69
years_1013
years_1417 years_1822 male_mig_hh female_mig_hh school_mighh hh_greece
hh_italy sch_head costal central mountain soc_cap dist_ind m07_q05 reshat,
nocons) /cut1 /cut2 /cut3 /cut4 /cut5 
 
ml search, repeat(100)
ml maximize, difficult
 
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index