You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
sorry for my very very belated answer. If you select sizeshape=T, then the first entry in the PC-scores captures the variability of the log transformed CS. In that case you will need to process the logCS separately:
usinig your example, you can do this like:
x <- newdataAlign
x <- sweep(x,1:2,proc$mshape)
size <- log(apply(newdata,3,cSize))
meanLogCS <- mean(log(proc$size))
size <- size-meanLogCS
x <- vecx(x)
x <- cbind(size,x)
scores <- x%*%(proc$PCs)
You will get some distortions though because the scaling in full PCA is based on a sample wide optimization of size. When you do this post-hoc, your results can deviate (slightly).
Expected behaviour: Expected PC scores from aligned data, but this fails when sizeshape=TRUE.
The text was updated successfully, but these errors were encountered: