Bookmark and Share

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

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

Re: st: marginal effects in the censored ordered probit

From   Maarten Buis <[email protected]>
To   [email protected]
Subject   Re: st: marginal effects in the censored ordered probit
Date   Mon, 29 Aug 2011 15:18:47 +0200

There are two problems: 1) Which marginal effect do you want? In such
models there are many ways to define outcomes, which one you want to
use depends on the details of your research problem. 2) How to get
them using Stata. In essence you created a new estimation command,
which means Stata does not know how it fits into its post-estimation
commands. The key step is to make a prediction routine that is
recognized by -predict- and -margins- or -mfx-. For the single
equation case see -help _pred_se-. In your case you will multiple
equations, so you need to look at the code of other estimation
commands to see how to generalize the advise in -help _pred_se- to
your problem. All this is not impossible, but it is not a trivial task

-- Maarten

On Mon, Aug 29, 2011 at 12:36 PM, Marina Mastrorillo <[email protected]> wrote:
> 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:
> *
> *
> *

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen

*   For searches and help try:

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