Dear all,
I use -cmp- to estimate an ordered probit model with an endogenous variable, but I don't know how to compute marginal effects after estimating the model. So could anybody give me some suggestions? My codes: (here laborsup is just an example, not my true model) cmp setup webuse laborsup, clear cmp (kids = fem_educ) (fem_educ = fem_work male_educ), ind($cmp_oprobit $cmp_cont) tech(dfp) Any help will be much appreciated. Best, Sharon |
<> Well, the help file shows examples such as *********** mfx, predict(pr outcome(#1)) nonlinear *********** HTH Martin -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of xueliansharon Sent: Samstag, 24. Juli 2010 05:28 To: [hidden email] Subject: st: marginal effects for IV ordered probit Dear all, I use -cmp- to estimate an ordered probit model with an endogenous variable, but I don't know how to compute marginal effects after estimating the model. So could anybody give me some suggestions? My codes: (here laborsup is just an example, not my true model) cmp setup webuse laborsup, clear cmp (kids = fem_educ) (fem_educ = fem_work male_educ), ind($cmp_oprobit $cmp_cont) tech(dfp) Any help will be much appreciated. Best, Sharon -- View this message in context: http://statalist.1588530.n2.nabble.com/marginal-effects-for-IV-ordered-probi t-tp5331978p5331978.html Sent from the Statalist mailing list archive at Nabble.com. * * 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/ * * 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/ |
Hi, Martin,
Thanks for your help. Yes, your command works out the marginal effects, but I still want the standard errors for marginal effects and there's a warning message after running "mfx, predict(pr outcome(#1)) nonlinear": warning: predict() expression pr outcome(#5) unsuitable for standard-error calculation; option nose imposed As a result, stata doesn't compute the standard errors. So if I use the "force" option to get the standard errors of marginal effects, are these standard errors reliable? If not, could you please tell me how to get standard errors? Many thanks, Sharon <> Well, the help file shows examples such as *********** mfx, predict(pr outcome(#1)) nonlinear *********** HTH Martin |
<> There is always a good reason why Stata refuses to do certain things, so -force- may not be such a good idea. Could also be that you are simply out of luck with the se for the marginal effect. -h cmp- does state that "force may be needed when running old versions of mfx to stop this behavior." But "old" is apparently defined as pre January 2008 versions of -mfx-, which mine is not. HTH Martin -----Ursprüngliche Nachricht----- Von: [hidden email] [mailto:[hidden email]] Im Auftrag von xueliansharon Gesendet: Samstag, 24. Juli 2010 16:42 An: [hidden email] Betreff: st: RE: marginal effects for IV ordered probit Hi, Martin, Thanks for your help. Yes, your command works out the marginal effects, but I still want the standard errors for marginal effects and there's a warning message after running "mfx, predict(pr outcome(#1)) nonlinear": warning: predict() expression pr outcome(#5) unsuitable for standard-error calculation; option nose imposed As a result, stata doesn't compute the standard errors. So if I use the "force" option to get the standard errors of marginal effects, are these standard errors reliable? If not, could you please tell me how to get standard errors? Many thanks, Sharon <> Well, the help file shows examples such as *********** mfx, predict(pr outcome(#1)) nonlinear *********** HTH Martin -- View this message in context: http://statalist.1588530.n2.nabble.com/marginal-effects-for-IV-ordered-probi t-tp5331978p5332907.html Sent from the Statalist mailing list archive at Nabble.com. * * 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/ * * 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/ |
Hi Martin,
So do you mean that you didn't get an error message when you computed marginal effects after running my example of cmp on your Stata? I don't know how to check the version of my "mfx", but my stata version is 11.1, so I guess the version of "mfx" in my stata should not be the old one, then how can I get the correct standard errors? Do you have any suggestions? Many thanks, Sharon <> There is always a good reason why Stata refuses to do certain things, so -force- may not be such a good idea. Could also be that you are simply out of luck with the se for the marginal effect. -h cmp- does state that "force may be needed when running old versions of mfx to stop this behavior." But "old" is apparently defined as pre January 2008 versions of -mfx-, which mine is not. HTH Martin |
<> Just say ************* which mfx ************* to see your version of -mfx-. No, I do not have a good idea how you can get the se. If you -force- it, you are on your own... HTH Martin -----Ursprüngliche Nachricht----- Von: [hidden email] [mailto:[hidden email]] Im Auftrag von xueliansharon Gesendet: Samstag, 24. Juli 2010 21:16 An: [hidden email] Betreff: st: Re: AW: RE: marginal effects for IV ordered probit Hi Martin, So do you mean that you didn't get an error message when you computed marginal effects after running my example of cmp on your Stata? I don't know how to check the version of my "mfx", but my stata version is 11.1, so I guess the version of "mfx" in my stata should not be the old one, then how can I get the correct standard errors? Do you have any suggestions? Many thanks, Sharon <> There is always a good reason why Stata refuses to do certain things, so -force- may not be such a good idea. Could also be that you are simply out of luck with the se for the marginal effect. -h cmp- does state that "force may be needed when running old versions of mfx to stop this behavior." But "old" is apparently defined as pre January 2008 versions of -mfx-, which mine is not. HTH Martin -- View this message in context: http://statalist.1588530.n2.nabble.com/marginal-effects-for-IV-ordered-probi t-tp5331978p5333460.html Sent from the Statalist mailing list archive at Nabble.com. * * 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/ * * 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/ |
Thanks, Martin. Could you do me one more favor? Could you please try my -cmp- example on your stata and tell me whether you meet error message when you compute marginal effects?
Thanks a lot. Sharon |
<> Well, this code runs w/o an error: ************* cmp setup webuse laborsup, clear cmp (kids = fem_educ) (fem_educ = fem_work male_educ), /* */ ind($cmp_oprobit $cmp_cont) tech(dfp) forv i=1/4{ mfx, predict(pr outcome(#`i')) nonlinear } ************* All I get is the warning message for each outcome: "warning: predict() expression pr outcome(#2) unsuitable for standard-error calculation; option nose imposed" HTH Martin -----Ursprüngliche Nachricht----- Von: [hidden email] [mailto:[hidden email]] Im Auftrag von xueliansharon Gesendet: Samstag, 24. Juli 2010 21:26 An: [hidden email] Betreff: st: Re: AW: Re: AW: RE: marginal effects for IV ordered probit Thanks, Martin. Could you do me one more favor? Could you please try my -cmp- example on your stata and tell me whether you meet error message when you compute marginal effects? Thanks a lot. Sharon -- View this message in context: http://statalist.1588530.n2.nabble.com/marginal-effects-for-IV-ordered-probi t-tp5331978p5333469.html Sent from the Statalist mailing list archive at Nabble.com. * * 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/ * * 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/ |
Thanks, Martin.
Sharon |
This post has NOT been accepted by the mailing list yet.
In reply to this post by xueliansharon
my problem is that I use MLE to estimate an ordered probit model with a dummy endogebous variable, and I don't know how to compute marginal effects after estimating either.(I have tried the method you suggested above)
My codes:(here the model is just an example) ml model lf health_lf (health=kids age sex married hhsize, noconstant)(kids =te age sex married hhsize) (rho:) (a1:) (a2:) (a3:) (a4:) (a5:) (a6:), init(initv, copy) tech(bfgs) ml max Any help will be much appreciated. Best, Lillian |
Free forum by Nabble | Edit this page |