Re: [R] Obtaining the adjusted r-square given the regression coef ficients

From: Pfaff, Bernhard Dr. <>
Date: Wed 11 Jan 2006 - 20:16:46 EST

Hello Alexandra,

R2 is only defined for regressions with intercept. See a decent econometrics textbook for its derivation.


-----Ursprüngliche Nachricht-----
Von: Alexandra R. M. de Almeida [] Gesendet: Mittwoch, 11. Januar 2006 03:48 An:
Betreff: [R] Obtaining the adjusted r-square given the regression coefficients

Dear list   

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:                   


 if(is.matrix(Y)==F) (Y<-as.matrix(Y))    
 if(is.matrix(X)==F) (X<-as.matrix(X))    
 if(is.matrix(saM)==F) (saM<-as.matrix(saM))  
 RX<-rent.matrix(X,1)$Rentabilidade.tipo  RY<-rent.matrix(Y,1)$Rentabilidade.tipo

 for (i in 1:ncol(RY))
 dimnames(r2m)<-list(colnames(Y),c("Adjusted R-square"))  return(r2m)


  Alexandra R. Mendes de Almeida                                                                   

        [[alternative HTML version deleted]] mailing list PLEASE do read the posting guide!

Confidentiality Note: The information contained in this mess...{{dropped}} mailing list PLEASE do read the posting guide! Received on Wed Jan 11 22:31:22 2006

This archive was generated by hypermail 2.1.8 : Thu 12 Jan 2006 - 02:05:51 EST