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]

From |
Stephani Jens <Jens.Stephani@iab.de> |

To |
"'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu> |

Subject |
Re: st: Re: st: RE: endogeneous switching regression with movestay-ado: error after margins command |

Date |
Wed, 1 Feb 2012 13:51:51 +0000 |

------------------------------ ------------------------------ Thank you again for your suggestions, Nick. I did not get any reply from the authors yet. Jens >Date: Thu, 19 Jan 2012 10:06:37 +0000 >From: Nick Cox <njcoxstata@gmail.com> >Subject: Re: st: RE: endogeneous switching regression with movestay- >ado: error after margins command > >Thanks for the "probably". > >Dropping the observations with missing predictions before calling >- -margins- and contacting the authors directly at the World Bank are >my >only suggestions. > >Nick > >On Thu, Jan 19, 2012 at 9:45 AM, Stephani Jens <Jens.Stephani@iab.de> >wrote: > >> Thank you Nick, >> >> you are probably right concerning the use of the term "bug". >> >> Regarding your other suggestion, I already tried that before >> posting to statalist (i.e. using -if- and making -margins- >> conditional on the non-missing observations; it gave me >> another error message, “prediction is a function of possibly >> stochastic quantities other than e(b)”. >> >> When using -mfx- instead of -margins-, Stata gives another >> error message telling that it did not find the variable y0 >> (or y1, respectively). >> >> So I was wondering if somebody else is working with -movestay- >> and might be able to give me a hint. >> >> Thanks >> Jens >> >>>Date: Wed, 18 Jan 2012 14:01:40 +0000 >>>From: Nick Cox <n.j.cox@durham.ac.uk> >>>Subject: st: RE: endogeneous switching regression with movestay- >ado: >>>error after margins command >>> >>>I wouldn't cry "bug" before I was pretty certain, meaning I have >>>looked at some code and I am convinced it is wrong. A program not >>>behaving in the way you hope is not ipso facto evidence of a bug. >>> >>>- -margins- was introduced in Stata 11. -movestay- was written for >>>Stata 8, which does not rule out it being compatible with -margins- >, >>>but certainly means that the authors could not be expected to be >>>presciently aware of how it meshes with -margins-. >>> >>>At a wild guess, this may be soluble by making your -margins- call >>>conditional on there being non-missing predictions, using -if-. > > >> From: Stephani Jens <Jens.Stephani@iab.de> > >>>I am using the ado-file by Lokshin/Sajaia 2004 called movestay >(Stata >>>Journal 4, No. 3) to estimate an endogenous switching regression. >>>After estimation, I want to use the margins command to calculate >the >>>marginal effects in the outcome equations (conditional on being >>>observed in that equation) Unfortunately, I get an error message >>>saying " missing predicted values encountered within the estimation >>>sample r(322)". It seems to me that this is a bug. >>> >>>Here is my code: >>> >>>movestay (y $a), select(var1 $a $s) cluster(idnum) >>> >>>** output omitted ** >>> >>>margins, dydx($a) atmeans predict(yc1_1) >>> >>>Warning: cannot perform check for estimable functions. >>>missing predicted values encountered within the estimation sample >>>r(322); >>> > >* >* 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/

- Prev by Date:
**Re: st: set logtype text, permanent doesn't stay permanent** - Next by Date:
**re: st: set logtype text, permanent doesn't stay permanent** - Previous by thread:
**Re: st: set logtype text, permanent doesn't stay permanent** - Next by thread:
**RE: st: factor analysis and bootstrapping** - Index(es):