Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

predict.bgPCA

Compute between-group-PC scores from new data


Description

Compute between-group-PC scores from new data

Usage

## S3 method for class 'bgPCA'
predict(object, newdata, ...)

Arguments

object

object of class bgPCA returned from groupPCA

newdata

matrix or 3D array containing data in the same format as originally used to compute groupPCA

...

currently not used.

Value

returns the between-group-PC scores for new data

Examples

data(boneData)

boneLMPart <- boneLM[,,-(1:2)]
procPart <- procSym(boneLMPart)
pop_sex <- name2factor(boneLMPart, which=3:4)
## compute group PCA without first 2 specimens
gpcaPart <- groupPCA(procPart$orpdata, groups=pop_sex, rounds=0, mc.cores=2,cv=FALSE)
## align new data to Procrustes analysis
newdata <- align2procSym(procPart,boneLM[,,1:2])
## get scores for new data
newscores <- predict(gpcaPart,newdata)

Morpho

Calculations and Visualisations Related to Geometric Morphometrics

v2.8
GPL-2
Authors
Stefan Schlager [aut, cre, cph], Gregory Jefferis [ctb], Dryden Ian [cph]
Initial release
2020-02-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.