Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[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 <[email protected]>
To   [email protected]
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index