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

From |
"Martin Weiss" <martin.weiss1@gmx.de> |

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

Subject |
st: RE: RE : RE: nlcom from several estimations |

Date |
Mon, 8 Feb 2010 22:50:44 +0100 |

<> Truth be told, I have no idea, but I am keeping my fingers crossed somebody else will step in. HTH Martin -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Valerie Orozco Sent: Montag, 8. Februar 2010 22:28 To: statalist@hsphsun2.harvard.edu Subject: st: RE : RE: nlcom from several estimations Thank you Martin, I'm going to read the gmm documentation. But do you think there exists a solution to my problem? (without reprogramming with the gmm, and using my matrix of estimated parameters?) thank you valérie -----Message d'origine----- >From "Martin Weiss" <martin.weiss1@gmx.de> To <statalist@hsphsun2.harvard.edu> Subject st: AW: RE: RE: nlcom from several estimations Date Mon, 8 Feb 2010 17:34:57 +0100 <> " The only way to program N3SLS in Stata would have been to program GMM with Mata." Stata 11 comes with a -gmm- command (http://www.stata.com/stata11/gmm.html) that let`s you do this much more conveniently... HTH Martin -----Ursprüngliche Nachricht----- Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Valerie Orozco Gesendet: Montag, 8. Februar 2010 16:58 An: statalist@hsphsun2.harvard.edu Betreff: st: RE: RE: nlcom from several estimations Martin, maybe I'm wrong, but as far as I know : -"reg3" and "nlsur" don't estimate N3SLS with instrumental variables I wanted to estimate. -"reg3" allows IV but doesn't treat nonlinearity in parameters. -"nlsur" allows nonlinearity but no IV. The only way to program N3SLS in Stata would have been to program GMM with Mata. But I decided to run the estimation with another software estimating N3SLS quite easily. So I'm not able to estimate it with Stata and the only thing I can do is trying to reconstruct the estimation by "hand". Yes, I try the "ereturn post" command, even with a small program (Post) trying to add some local... see below : clear mat drop _all capture program drop Post program Post, eclass syntax, r(string) vce(string) eret post `r' `vce' eret local cmd "nlcom" end /****example with 2 estimations****/ /*1st estimation*/ matload b1 /*in reality, I have a .txt that I insheet, then mkmat and then matsave*/ matload V1 Post, r(b1) vce(V1) est store toto /*2nd estimation*/ matload b2 matload V2 Post, r(b2) vce(V2) est store titi suest toto titi after "suest" I have the message : "estimation sample of the model saved under toto could not be restored" Probably because I haven't the "e(sample)" information I'm not able to have since I have no data here...only matrix in my Stata session... -----Message d'origine----- >>From "Martin Weiss" <martin.weiss1@gmx.de> To <statalist@hsphsun2.harvard.edu> Subject st: AW: RE: nlcom from several estimations Date Mon, 8 Feb 2010 16:36:12 +0100 <> Have you actually tried to -ereturn post- foreign results and apply -suest- to them? That sounds like a stretch to me. You should first check whether you can recreate the results in Stata, perhaps using -reg3/nlsur-? HTH -----Message d'origine----- De : Valerie Orozco Envoyé : lundi 8 février 2010 16:29 À : 'statalist@hsphsun2.harvard.edu' Objet : RE: nlcom from several estimations Thank you John and Martin. John : by "model", I don't mean different groups, but really different models. I'm estimating 4 different systems of equations (N3SLS= Nonlinear 3 stages system of equations) and the variables are not the same in each one. (my goal is then to estimate unconditional elasticities in a demand system coming from the elasticities from different steps...). "Suest" seems to do what I need except that I have a difficulty due to the fact that the estimation wasn't done with Stata (because Stata doesn't easily estimate N3SLS). But like I prefer Stata, I stored the b and V matrix into text files and then insheet in Stata and re"build" my matrix b`i' and V`i' (i=1,...,4)...I can also use "ereturn post" to "re"build each estimation and store it. But, doing "suest", it seems some informations (for example e(sample), e(N)...stored by local during the estimation) are missing... If you have more ideas... Thank you Valérie ____________________________________________________ >>From "Martin Weiss" <martin.weiss1@gmx.de> To <statalist@hsphsun2.harvard.edu> Subject st: AW: nlcom from several estimations Date Mon, 8 Feb 2010 14:35:14 +0100 Have you had a look at -suest- yet? HTH Martin ____________________________________________________ On 08.02.2010 14:32, Valerie Orozco wrote: Hello, I have to estimate some nonlinear combinations of parameters estimated from several models. More precisely, I estimated 4 models (4 systems of equations) and have the corresponding matrix of estimated parameters (b1, b2, b3 and b4) and each corresponding variance covariance matrix (V1, V2, V3, V4). I want to estimate combinations of these parameters coming from these 4 estimations. The problem is that, with "nlcom", it has to be from only one estimation. So, my first idea was to build two new matrix (b and V) making Stata believes it comes from only one estimation : - b : just appending b1,b2, b3 and b4 horizontally - V : a block diagonal matrix (each block being V1, V2, V3 and V4) - but of course, some elements of this V block diagonal matrix are missing Another idea I had was to use "eststo" and "estout" commands but it seems the matrix stored correspond to the last estimation. Do you have some better ideas to help me? Many thanks. Valérie ------------------------------- Valérie OROZCO Toulouse School of Economics (INRA-GREMAQ) 21, allée de Brienne F-31000 Toulouse, France MA 101 +33 5 61 12 85 91 ------------------------------- ------------------------------- Valérie OROZCO Toulouse School of Economics (INRA-GREMAQ) 21, allée de Brienne F-31000 Toulouse, France MA 101 +33 5 61 12 85 91 ------------------------------- * * 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/

**References**:**st: RE : RE: RE: Problem with "ereturn post" command***From:*Valerie Orozco <Valerie.Orozco@toulouse.inra.fr>

**st: RE : RE: RE: Problem with "ereturn post" command***From:*Valerie Orozco <Valerie.Orozco@toulouse.inra.fr>

**st: RE : RE: nlcom from several estimations***From:*Valerie Orozco <Valerie.Orozco@toulouse.inra.fr>

- Prev by Date:
**RE: st: Latent Variable and IV** - Next by Date:
**st: gllamm - too few variables specified** - Previous by thread:
**st: RE : RE: nlcom from several estimations** - Next by thread:
**st: RE: Problem with "ereturn post" command** - Index(es):

© Copyright 1996–2016 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |