Univariate functional observations with or without indication of groups as well as mean functions of samples are plotted. We assume that n univariate functional observations are observed on a common grid of T design time points equally spaced in I=[a,b] (see Section 3.1 of the vignette file, vignette("fdANOVA", package = "fdANOVA")).
plotFANOVA(x, group.label =NULL, int =NULL, separately =FALSE, means =FALSE, smooth =FALSE,...)
Arguments
x: a T×n matrix of data, whose each column is a discretized version of a function and rows correspond to design time points.
group.label: a character vector containing group labels. Its default value means that all functional observations are drawn without division into groups.
int: a vector of two elements representing the interval I=[a,b]. When it is not specified, it is determined by a number of design time points.
separately: a logical indicating how groups are drawn. If separately = FALSE, groups are drawn on one plot by different colors. When separately = TRUE, they are depicted in different panels.
means: a logical indicating whether to plot only group mean functions.
smooth: a logical indicating whether to plot reconstructed data via smoothing splines instead of raw data.
...: additional arguments not used.
Author(s)
Tomasz Gorecki, Lukasz Smaga
See Also
fanova.tests, fmanova.ptbfr, fmanova.trp
Examples
# Some of the examples may run some time.# gait data (both features)library(fda)gait.data.frame <- as.data.frame(gait)x.gait <- vector("list",2)x.gait[[1]]<- as.matrix(gait.data.frame[,1:39])x.gait[[2]]<- as.matrix(gait.data.frame[,40:78])# vector of group labelsgroup.label.gait <- rep(1:3, each =13)plotFANOVA(x = x.gait[[1]], int = c(0.025,0.975))plotFANOVA(x = x.gait[[1]], group.label = as.character(group.label.gait), int = c(0.025,0.975))plotFANOVA(x = x.gait[[1]], group.label = as.character(group.label.gait), int = c(0.025,0.975), separately =TRUE)plotFANOVA(x = x.gait[[1]], group.label = as.character(group.label.gait), int = c(0.025,0.975), means =TRUE)plotFANOVA(x = x.gait[[1]], int = c(0.025,0.975), smooth =TRUE)plotFANOVA(x = x.gait[[1]], group.label = as.character(group.label.gait), int = c(0.025,0.975), smooth =TRUE)plotFANOVA(x = x.gait[[1]], group.label = as.character(group.label.gait), int = c(0.025,0.975), separately =TRUE, smooth =TRUE)plotFANOVA(x = x.gait[[1]], group.label = as.character(group.label.gait), int = c(0.025,0.975), means =TRUE, smooth =TRUE)plotFANOVA(x = x.gait[[2]], int = c(0.025,0.975))plotFANOVA(x = x.gait[[2]], group.label = as.character(group.label.gait), int = c(0.025,0.975))plotFANOVA(x = x.gait[[2]], group.label = as.character(group.label.gait), int = c(0.025,0.975), separately =TRUE)plotFANOVA(x = x.gait[[2]], group.label = as.character(group.label.gait), int = c(0.025,0.975), means =TRUE)plotFANOVA(x = x.gait[[2]], int = c(0.025,0.975), smooth =TRUE)plotFANOVA(x = x.gait[[2]], group.label = as.character(group.label.gait), int = c(0.025,0.975), smooth =TRUE)plotFANOVA(x = x.gait[[2]], group.label = as.character(group.label.gait), int = c(0.025,0.975), separately =TRUE, smooth =TRUE)plotFANOVA(x = x.gait[[2]], group.label = as.character(group.label.gait), int = c(0.025,0.975), means =TRUE, smooth =TRUE)# Canadian Weather data (both features)library(fda)x.CW <- vector("list",2)x.CW[[1]]<- CanadianWeather$dailyAv[,,1]x.CW[[2]]<- CanadianWeather$dailyAv[,,2]# vector of group labelsgroup.label.CW <- rep(c("Eastern","Western","Northern"), c(15,15,5))plotFANOVA(x = x.CW[[1]])plotFANOVA(x = x.CW[[1]], group.label = as.character(group.label.CW))plotFANOVA(x = x.CW[[1]], group.label = as.character(group.label.CW), separately =TRUE)plotFANOVA(x = x.CW[[1]], group.label = as.character(group.label.CW), means =TRUE)plotFANOVA(x = x.CW[[1]], smooth =TRUE)plotFANOVA(x = x.CW[[1]], group.label = as.character(group.label.CW), smooth =TRUE)plotFANOVA(x = x.CW[[1]], group.label = as.character(group.label.CW), separately =TRUE, smooth =TRUE)plotFANOVA(x = x.CW[[1]], group.label = as.character(group.label.CW), means =TRUE, smooth =TRUE)plotFANOVA(x = x.CW[[2]])plotFANOVA(x = x.CW[[2]], group.label = as.character(group.label.CW))plotFANOVA(x = x.CW[[2]], group.label = as.character(group.label.CW), separately =TRUE)plotFANOVA(x = x.CW[[2]], group.label = as.character(group.label.CW), means =TRUE)plotFANOVA(x = x.CW[[2]], smooth =TRUE)plotFANOVA(x = x.CW[[2]], group.label = as.character(group.label.CW), smooth =TRUE)plotFANOVA(x = x.CW[[2]], group.label = as.character(group.label.CW), separately =TRUE, smooth =TRUE)plotFANOVA(x = x.CW[[2]], group.label = as.character(group.label.CW), means =TRUE, smooth =TRUE)