I try to run the command file for application of Size-free canonical discriminant analysis from SAS to R [Size-Free CDA1. But, i have no idea how interpretate PROC SCORE in r
This is the my problematic step in SAS
proc princomp cov n=1 data=sashelp.iris out=prin;
var SepalLength SepalWidth PetalLength PetalWidth;
proc reg data=prin outest=coefregs;
r1: Model SepalLength = prin1;
r2: Model SepalWidth = prin1;
r3: Model PetalLength = prin1;
r4: Model PetalWidth = prin1;
proc score type= parms residual data=prin score=coefregs out= resid;
var SepalLength SepalWidth PetalLength PetalWidth prin1;
And this is my script in R for this step, without the PROC SCORE
pc <- princomp(iris[1:4], cor = F)
scores <- pc[["scores"]]
prin1 <- as.data.frame(scores[,1])
coefregs <- lm(cbind(Sepal.Length, Sepal.Width, Petal.Length, Petal.Width) ~ prin1[,1],
data=iris)
glht???
I still dont understand how this function works in SAS, Therefore, i would be grateful if you could help me with some of code in r that mimic PROC SCORE
Note: SAS iris data is in mm, in R it is cm