[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Maarten Buis" <M.Buis@fsw.vu.nl> |

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

Subject |
st: RE: saving and later retrieving results from an estimated model |

Date |
Wed, 23 Nov 2005 11:16:13 +0100 |

Have a look at -sureg-. Hope this helps, Maarten ----------------------------------------- Maarten L. Buis Department of Social Research Methodology Vrije Universiteit Amsterdam Boelelaan 1081 1081 HV Amsterdam The Netherlands visiting adress: Buitenveldertselaan 3 (Metropolitan), room Z214 +31 20 5986715 http://home.fsw.vu.nl/m.buis/ ----------------------------------------- -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu]On Behalf Of Colin.Vance@dlr.de Sent: woensdag 23 november 2005 11:12 To: statalist@hsphsun2.harvard.edu Subject: st: saving and later retrieving results from an estimated model Hello, I'd like to use the delta method (nlcom) to compute the standard error for a non-linear function of regression coefficients, where the regression coefficients are drawn from two different models. My non-linear function also includes the predicted values from one of the models. My problem is that after having estimated the second model, I can't figure out how to access the results from the first model. That is, I can save the coefficients estimated from the first model as a fixed value, but I want nlcom to know that it is an estimated parameter. Here's hypothetical code that demonstrates what I'm trying to do: regress y1 x1 x2 x3 keep if e(sample) sum x1 local x1=r(mean) sum x2 local x2=r(mean) sum x3 local x3=r(mean) local predxb "_b[x1]*`x1'+_b[x2]*`x2'+_b[x3]*`x3'+ _b[_cons]" regress y2 x3 x4 local temp _b[x3]/_b[x1] + `predxb'/_b[x4] /*The above line is where the problem occurs, since _b[x1] and `predxb' are discarded with the estimation of the second model.*/ nlcom `temp' As a hunch, I think I may need to write a program of the eclass variant that estimates the first model, which I would then access when using nlcom, but I'm not sure how to do this. Any advice would be appreciated. Many thanks, Colin * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

- Prev by Date:
**st: saving and later retrieving results from an estimated model** - Next by Date:
**RE: st: right justifying strings, left padding strings with zeros** - Previous by thread:
**st: saving and later retrieving results from an estimated model** - Next by thread:
**st: Test of equality of the coefficients between two samples endogeneity and IVREG2** - Index(es):

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