[R] FW: aggregating variables with pca

From: Christian Jones <ccatj_at_web.de>
Date: Mon 23 Jan 2006 - 20:16:30 EST

Christian Jones <ccatj@web.de> schrieb am 19.01.06 16:58:58:

hello R_team

having perfomed a PCA on my fitted model with the function:

data<- na.omit(dataset)

data.pca<-prcomp(data,scale =TRUE),

Ive decided to aggregate two variables that are highly correlated.

My first question is:

How can I combine the two variables into one new predictor?

and secondly:

How can I predict with the newly created variable in a new dataset?

Guess I need the "predict" and "new data" command but Im having problems with the syntax and the help function was not sufficient on this issue.

many thanks in advance

Christian

[[alternative HTML version deleted]]



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

Erweitern Sie FreeMail zu einem noch leistungsstarkeren E-Mail-Postfach!

        [[alternative HTML version deleted]]



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 Mon Jan 23 20:25:16 2006

This archive was generated by hypermail 2.1.8 : Mon 23 Jan 2006 - 22:29:46 EST