[R] question about predict.princomp
ronggui
0034058 at fudan.edu.cn
Sun Mar 27 04:51:18 CEST 2005
from the code of predict for princomp,it scale the new data using the object$center and pbject$scores,i wander why?if the predict function desgined for validitation?but "analyzing multivariate data"(lattin,carrol and green) say:in general,when we raise the notion of validity,we are questioning the generalizability of the results frome our analysis the particular sample......one way to adress this question is to use a holdout sample....thus ...form the linear combination X(s)u(1) using the standardized data from the second (holdout)sample,and have the variance of component thus formed be appoximately equal to the variance of Z1 from the principal components analysis of the first sample.
so ,why the predict scale the newdata using scale(newdata, object$center, object$scale) but NOT scale(newdata,scale=T,center=T)?
More information about the R-help
mailing list