
Functional principal components analysis of distribution or concentration profiles.
Generic function for functional principal components analysis
# S3 method for distrProfile
funPCA(object, what, nharm = 4, ...)# S3 method for conProfile
funPCA(object, what, nharm = 4, ...)
funPCA(object, ...)
An object of class trackeRfpca
.
The object to which a functional principal components analysis is applied.
The variable for which the profiles should be analysed.
The number of principal components estimated.
Arguments to be passed to methods.
The ...
argument is passed on to pca.fd
.
Ramsay JO, Silverman BW (2005). Functional Data Analysis. Springer-Verlag New York.
if (FALSE) {
data('runs', package = 'trackeR')
dp <- distributionProfile(runs, what = 'speed')
dp.pca <- funPCA(dp, what = 'speed', nharm = 4)
## 1st harmonic captures vast majority of the variation
plot(dp.pca, harm = 1)
## time spent above speed = 0 is the characteristic distinguishing the profiles
sumRuns <- summary(runs)
plot(sumRuns$durationMoving, dp.pca$scores[,1])
}
Run the code above in your browser using DataLab