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

From |
"Joseph Coveney" <[email protected]> |

To |
<[email protected]> |

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

Date |
Wed, 20 May 2009 22:32:18 +0900 |

marcel spijkerman wrote: I estimate a weighted non-linear model of the following form: y^0.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? -------------------------------------------------------------------------------- I'm afraid that you've lost me, here: by "untransformed variables", do you mean without square-root transformations of the response variable and predictor expression? If so, then, after untransforming both sides, wouldn't it be: regress y X [aweight=z] Joseph Coveney clear * set more off set obs 500 set seed `=date("2009-05-20", "YMD")' generate double y = runiform() generate double X = runiform() generate double hhd1564_06 = runiform() generate double sqrt_y = sqrt(y) nl (sqrt_y = ({a1} + {a2} * X)^0.5) [aweight=hhd1564_06] clonevar z = hhd1564_06 regress y X [aweight=z] nl (y = abs({a1} + {a2} * X)) [aweight=hhd1564_06] // abs() redundant, actually exit * * 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: computation of R-squared with a non-linear model***From:*marcel spijkerman <[email protected]>

- Prev by Date:
**st: Re: Test for homogeneity of odds ratios with ordinal data (r x 2)?** - Next by Date:
**st: Monica Daigl Cattaneo is out of the office.** - Previous by thread:
**RE: st: Re: computation of R-squared with a non-linear model** - Next by thread:
**st: display single value stored in e()** - Index(es):

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