Re: [R] Principal Components in a Linear Model

2013-11-22 Thread Bert Gunter
1. Probably not, depending on what you expect to gain from this. R's numerical procedures can almost certainly handle the correlations. 2. Search on "R package for principal components regression" instead of rolling your own.There are several (e.g. "chemometrics", "pls", etc.) -- Bert On Fri, No

[R] Principal Components in a Linear Model

2013-11-22 Thread Chris Wilkinson
My data has correlations between predictors so I think it would be advantageous to rotate the axes with prcomp(). > census <- read.table(paste("http://www.stat.wisc.edu/~rich/JWMULT02dat","T8-5.DAT",sep ="/"),header=F) > census V1 V2V3 V4 V5 1 5.935 14.2 2.265 2.27 2.91 2 1.523 1