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

From |
Paul Seed <[email protected]> |

To |
"[email protected]" <[email protected]> |

Subject |
st: Re: computation of R-squared with a non-linear model |

Date |
Fri, 22 May 2009 09:25:00 +0100 |

Using the auto data set: **** Start Stata code ***** sysuse auto regress weight price predict pred_w su weight pred_w corr weight pred_w di "R-squared = " r(rho)*r(rho) **** End Stata code ***** Both ways giver a value of 0.2901023

but neither will alter a correltion of 1.0.

c) Stata is right - both methods give R-squared = 1.0 d) Something else I haven't though to. I'd be interested to know which.

> Date: Wed, 20 May 2009 08:27:31 +0000 > From: [email protected] > Subject: RE: st: Re: computation of R-squared with a non-linear model > To: [email protected] > > > --- "marcel spijkerman" wrote:>>>> I estimate a weighted non-linear model of the >>>> following form: >>>> >>>> y0.5 = (a1 + a2*X)0.5 weighted by some other >>>> variable z. >>>> >>>> Stata reports an adjusted R-squared of 1.000. I >>>> suspect this is not correct. How can compute the >>>> correct adjusted R-squared using untransformed >>>> variables?> > --- Martin Weiss wrote:>>> Which command did you use for your estimation? If it >>> was non-linear, -nl-? >>> Show us what you typed and what the reply was...> > --- On Wed, 20/5/09, marcel spijkerman wrote:>> I indeed typed the command: >> >> nl (sqrt_y = (a1 + a2X)0.5) [aweight= hhd1564_06] >>>> And the answer is .... :-)> > It is surprising that you got output at all, as you > did not specify any parameters. Anyhow, it appears that > you have a convergence problem. So the next step is > not to try to come up with some correct R2, but to > fix the model. You could try specifing starting > values. > > -- Maarten > > Ps. -aweights- are very very very rarely the correct > weight type. >

Paul T Seed MSc CStat CSci, Senior Lecturer in Medical Statistics, tel (+44) (0) 20 7188 3642, fax (+44) (0) 20 7620 1227

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

**Follow-Ups**:**st: RE: Re: computation of R-squared with a non-linear model***From:*"Nick Cox" <[email protected]>

**RE: st: Re: computation of R-squared with a non-linear model***From:*marcel spijkerman <[email protected]>

- Prev by Date:
**RE: st: Getting data from NBER to STATA** - Next by Date:
**RE: st: Re: computation of R-squared with a non-linear model** - Previous by thread:
**RE: st: Re: computation of R-squared with a non-linear model** - Next by thread:
**RE: st: Re: computation of R-squared with a non-linear model** - Index(es):

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