Re: [R] How to compare linear models with intercept and those withoutintercept using minimizing adjs R^2 strategy

From: Lucke, Joseph F <Joseph.F.Lucke_at_uth.tmc.edu>
Date: Mon, 21 May 2007 09:53:35 -0500

One issue is whether you want your estimators to be based on central moments (covariances) or on non-central moments. Removing the intercept changes the statistics from central to non-central moments. The adjusted R2, by which I think you mean Fisher's adjusted R2, is based on central moments (ratio of unbiased estimators of variances---central moments). So if you remove the intercept, you must re-derive the adjusted R2 for non-central moments --- you can't just plug in the number of independent variables as zero.

-----Original Message-----
From: r-help-bounces_at_stat.math.ethz.ch
[mailto:r-help-bounces_at_stat.math.ethz.ch] On Behalf Of ??? Sent: Sunday, May 20, 2007 8:53 PM
To: r-help_at_stat.math.ethz.ch
Subject: [R] How to compare linear models with intercept and those withoutintercept using minimizing adjs R^2 strategy

Dear R-list,

I apologize for my many emails but I think I know how to desctribe my problem differently and more clearly.

My question is how to compare linear models with intercept and those without intercept using maximizing adjusted R^2 strategy.

Now I do it like the following:

> library(leaps)
> n=20
> x=matrix(rnorm(n*3),ncol=3)
> b=c(1,2,0)
> intercept=1
> y=x%*%b+rnorm(n,0,1)+intercept
>
> var.selection=leaps(cbind(rep(1,n),x),y,int=F,method="adjr2")
> ##### Choose the model with maximum adjr2
> var.selection$which[var.selection$adjr2==max(var.selection$adjr2),]

    1 2 3 4
 TRUE TRUE TRUE FALSE Actually, I use the definition of R-square in which the model is without a intercept term.

Is what I am doing is correct?

Thanks for any suggestion or correction.

-- 
Junjie Li,                  klijunjie_at_gmail.com
Undergranduate in DEP of Tsinghua University,

	[[alternative HTML version deleted]]

______________________________________________
R-help_at_stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help_at_stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Mon 21 May 2007 - 15:01:04 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 21 May 2007 - 15:31:32 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.