[R] question about predict.princomp

From: ronggui <0034058_at_fudan.edu.cn>
Date: Sun 27 Mar 2005 - 12:51:18 EST

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)?

R-help@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 Received on Sun Mar 27 12:57:05 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:56 EST