Re: [R] after PCA, the pc values are so large, wrong?

2009-11-08 Thread bbslover
ok,I understand your means, maybe PLS is better for my aim. but I have done that, also bad. the most questions for me is how to select less variables from the independent to fit dependent. GA maybe is good way, but I do not learn it well. Ben Bolker wrote: > > bbslover yeah.net> writes: > >>

Re: [R] after PCA, the pc values are so large, wrong?

2009-11-07 Thread Ben Bolker
bbslover yeah.net> writes: > [snip] > the fit result below: > Call: > lm(formula = y ~ x1 + x2 + x3, data = pc) > > Residuals: > Min 1Q Median 3Q Max > -1.29638 -0.47622 0.01059 0.49268 1.69335 > > Coefficients: > Estimate Std. Error t value Pr(>|t|)

[R] after PCA, the pc values are so large, wrong?

2009-11-07 Thread bbslover
rm(list=ls()) yx.df<-read.csv("c:/MK-2-72.csv",sep=',',header=T,dec='.') dim(yx.df) #get X matrix y<-yx.df[,1] x<-yx.df[,2:643] #conver to matrix mat<-as.matrix(x) #get row number rownum<-nrow(mat) #remove the constant parameters mat1<-mat[,apply(mat,2,function(.col)!(all(.col[1]==.col[2:rownum]))