Re: Obtaining the adjusted r-square given the regression coef ficients
R2 is only defined for regressions with intercept. See a decent econometrics
textbook for its derivation.
Von: Alexandra R. M. de Almeida [mailto:[hidden email]]
Gesendet: Mittwoch, 11. Januar 2006 03:48
An: [hidden email] Betreff: [R] Obtaining the adjusted r-square given the regression
I want to obtain the adjusted r-square given a set of coefficients (without
the intercept), and I don't know if there is a function that does it.
I know that if you make a linear regression, you enter the dataset and have
in "summary" the adjusted r-square. But this is calculated using the
coefficients that R obtained,and I want other coefficients that i calculated
separately and differently (without the intercept term too).
I have made a function based in the equations of the book "Linear Regression
Analisys" (Wiley Series in probability and mathematical statistics), but it
doesn't return values between 0 and 1. What is wrong????
The functions is given by:
for (i in 1:ncol(RY))