Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: How is the R2 for nonlinear least squares obtained?


From   Zoe Kuehn <zoe.kuehn@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: How is the R2 for nonlinear least squares obtained?
Date   Tue, 5 Jun 2012 22:08:37 +0200

Hi
I am using STATA's nl command for estimating a nonlinear CES function. But
the R2 that STATA reports does not correspond to the R2 I calculate when
transferring the data to excel. However, it turns out to be exactly equal
to a measure called "Cos^2", i.e. the square of the cosine of the angle
between Y and its predictor (Cos^2=(sum(y*y_hat)^2/(sum(y^2)*sum(y_hat^2)).
Does somebody know if that is mere coicidence, or if this is the way STATA
calculates the R2 for Nonlinear least squares?  If this is the way STATA
calculates the R2 for the nl command does anybody know the reason for it?
Thank you!
Best
Zoe

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


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