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

From |
Lopa Chakraborti <lchakraborti@arec.umd.edu> |

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

Subject |
RE: st: RE: re: problem using predictnl after obtaining non-linear estimates |

Date |
Sun, 26 Oct 2008 19:51:07 -0400 |

that's it! I was referring to the coefficient estimates incorrectly by putting the dollar sign in front instead of referring to them as _b[]. It worked. grateful to all for the feedback and advise Lopa ________________________________________ From: owner-statalist@hsphsun2.harvard.edu [owner-statalist@hsphsun2.harvard.edu] On Behalf Of Maarten buis [maartenbuis@yahoo.co.uk] Sent: Sunday, October 26, 2008 4:54 PM To: statalist@hsphsun2.harvard.edu Subject: Re: st: RE: re: problem using predictnl after obtaining non-linear estimates --- Lopa Chakraborti <lchakraborti@arec.umd.edu> wrote: > I tried using nlcom without using any of the Xs and it seems to > generate only a constant. It seems that only the point estimates of > the parameters are being used and not the variance covariance matrix. > nlcom (bod1 : ($K2/($K1-$K2))*exp(-$K1)*(exp(-$K2)-exp(-$K1))) > > bod1: > (.0014539294546791/(.0009593881362685-.0014539294546791))*exp(-.0009593881 > > 362685)*(exp(-.0014539294546791)-exp(-.0009593881362685)) While it is legal syntax to use global or local macros, and apparently -nl- stores the coefficients in the global macro you have used, these macros just contain the numbers without any reference to the model or the variance covariance matrix. If you want to combine parameter estimates you will have to refer to the parameters as: [equation name]_b[variable name]. -nl- can be a bit weird in how it stores the coefficients, and I would not be surprised if that has changed since Stata 8. The easiest way to find out how to refer to the parameters is to type -matrix list e(b)- If you get something like: e(b)[1,2] mpg _cons y1 -238.89435 11253.061 you can refer to the parameters as _b[mpg] and _b[_cons] If you get something like: e(b)[1,4] 4: 4: 5: 5: price _cons price _cons y1 -.0000205 -.67229653 -.0000414 -1.0395561 You can refer to them as [4]_b[price] and [5]_b[price] Hope this helps, Maarten ----------------------------------------- Maarten L. Buis Department of Social Research Methodology Vrije Universiteit Amsterdam Boelelaan 1081 1081 HV Amsterdam The Netherlands visiting address: Buitenveldertselaan 3 (Metropolitan), room N515 +31 20 5986715 http://home.fsw.vu.nl/m.buis/ ----------------------------------------- * * 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: problem using predictnl after obtaining non-linear estimates***From:*Lopa Chakraborti <lchakraborti@arec.umd.edu>

**Re: st: RE: re: problem using predictnl after obtaining non-linear estimates***From:*Maarten buis <maartenbuis@yahoo.co.uk>

- Prev by Date:
**Re: st: RE: regression: fade rate residual income** - Next by Date:
**st: exporting decimal place format styles** - Previous by thread:
**Re: st: RE: re: problem using predictnl after obtaining non-linear estimates** - Next by thread:
**st: re: problem using predictnl after obtaining non-linear estimates** - Index(es):

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