Library: | fda |
See also: | plotfd grfd data2fd createfdbasis |
Quantlet: | fdamean | |
Description: | creates a functional object with mean function |
Usage: | fdamean = fdamean(fdobject) | |
Input: | ||
fdobject | list, functional (fd) object with n replications | |
Output: | ||
fdamean | list, functional (fd) object with one replication |
library("fda") y = read("dailtemp.dat") tvec=#(1:365)/365 fdb = createfdbasis("fourier", #(0,1),31,1) fdtempf31=data2fd(y,tvec,fdb) Tempdi=createdisplay(1,1) fdameanf=fdamean(fdtempf31) grtempf=grfd(fdameanf) show(Tempdi,1,1,grtempf)
The mean function for temperature dataset is ploted, using 31 Fourier functions