Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: fda
See also: evalfd meanfd data2fd

Quantlet: fdaspca
Description: performs the smoothed functional PCA

Usage: {fpcaresult,values,varprop,scores} = fdaspca(fdobject,lambda,lfd,npc{,norm})
Input:
fdobject list, functional (fd) object with n repetitions
lambda scalar, smoothing parameter
lfd list, LDO object, linear differential opereator
npc scalar, number of eigenfunctions, default = 4
norm string, normalization type, if norm=="orthonorm" fpcaresult.coef are orthonormalized (with respect to the basis penalty matrix), if norm=="norm" the coefficients are renormalized to norm=1, default is no normalization
Output:
fpcaresult list, functional (fd) object
values vector, npc x 1, eigenvalues
varprop vector, npc x 1, variance proportions
scores n x npc matrix, principal scores

Note:

Example:
library("plot")
library("fda")
axeson()
y = read("dailtemp.dat")
tvec=#(1:365)/365
fdb = createfdbasis("fourier", #(0,1),31,1)
fdtempf31=data2fd(y,tvec,fdb)
fdapc=fdaspca(fdtempf31,0.0,2,4)
Tempdi=createdisplay(1,1)
grtempf=grfd(fdapc.fpcaresult,grid(0,1/100,100),0,#(0,1,2,3))
show(Tempdi,1,1,grtempf)

Result:
first 4 eigenfunctions are plotted



Author: M. Benko 20041205 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006