Learn R Programming

funHDDC (version 2.0)

plot.mfpca: Graphical representation for MFPCA

Description

Graphical representations for MFPCA: smoothed data plots, scores plots, variation of the mean curve and eigenfunction plots.

Usage

# S3 method for mfpca
plot(x,nharm,threshold,...)

Arguments

x

An object produced by mfpca function.

nharm

The number of harmonics for which you want graphical representations, default value is 3.

threshold

The threshold of proportion of variance that stop plotting, default value is 0.05.

...

Arguments to be passed to methods, such as graphical parameters.

Value

Data plot

plot of all smooth curves for each functional variable.

Scores plots

plot of curves coordinates on the number of eigenfunctions/harmonics selected and depending on the threshold choosen.

Mean curve plots

plot of variation of the mean curve. Variations are estimated based on the mean values with addition (red) and substraction (blue) of each eigenfunction.

Eigenfunction plots

visualization of each eigenfunction/harmonic selected and depending on the threshold choosen.

References

- C. Bouveyron and J. Jacques, Model-based Clustering of Time Series in Group-specific Functional Subspaces, Advances in Data Analysis and Classification, vol. 5 (4), pp. 281-300, 2011. - A. Schmutz, C. Bouveyron, J. Jacques, L. Cheze and P. Martin, Clustering multivariate functional data in group-specic functional subspaces, Preprint HAL 01652467, Universit<U+00E9> C<U+00F4>te d'Azur, 2017.

Examples

Run this code
# NOT RUN {
  library(fda)

  ####Univariate case: "Canadian temperature" data (Ramsey & Silverman)
  daybasis65 <- create.fourier.basis(c(0, 365), nbasis=65, period=365)
  daytempfd <- smooth.basis(day.5, CanadianWeather$dailyAv[,,"Temperature.C"], daybasis65,
                            fdnames=list("Day", "Station", "Deg C"))$fd

  res.pca<-mfpca(daytempfd)
  plot(res.pca,nharm=4)


  ####Multivariate case: "Canadian temperature" data (Ramsey & Silverman)
  daybasis65 <- create.fourier.basis(c(0, 365), nbasis=65, period=365)
  daytempfd <- smooth.basis(day.5, CanadianWeather$dailyAv[,,"Temperature.C"], daybasis65,
                            fdnames=list("Day", "Station", "Deg C"))$fd
  dayprecfd<-smooth.basis(day.5, CanadianWeather$dailyAv[,,"Precipitation.mm"], daybasis65,
                          fdnames=list("Day", "Station", "Mm"))$fd

  res.pca<-mfpca(list(daytempfd,dayprecfd))
  plot(res.pca,nharm=4)

# }

Run the code above in your browser using DataLab