Statalist


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

st: RE: RE: nlcom from several estimations


From   Valerie Orozco <Valerie.Orozco@toulouse.inra.fr>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: RE: nlcom from several estimations
Date   Mon, 8 Feb 2010 16:58:06 +0100

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-----



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