plot.ITPaov: Plotting ITP results for functional analysis of variance...

View source: R/plot.ITPaov.R

plot.ITPaovR Documentation

Plotting ITP results for functional analysis of variance testing

Description

plot method for class "ITPaov". Plotting function creating a graphical output of the ITP for the test on a functional analysis of variance: functional data, and ITP-adjusted p-values of the F-tests on the whole model and on each factor are plotted.

Usage

## S3 method for class 'ITPaov'
plot(x,xrange=c(0,1), alpha1=0.05, alpha2=0.01,
     plot.adjpval=FALSE,ylim=range(x$data.eval),col=1,
     ylab='Functional Data',main=NULL,lwd=1,pch=16,...)

Arguments

x

The object to be plotted. An object of class "ITPaov", usually, a result of a call to ITPaovbspline.

xrange

Range of the x axis.

alpha1

First level of significance used to select and display significant effects. Default is alpha1 = 0.05.

alpha2

Second level of significance used to select and display significant effects. Default is alpha1 = 0.01. alpha1 and alpha2 are s.t. alpha2 < alpha1. Otherwise the two values are switched.

plot.adjpval

A logical indicating wether the plots of adjusted p-values have to be done. Default is plot.adjpval = FALSE.

col

Colors for the plot of functional data. Default is col = 1.

ylim

Range of the y axis. Default is ylim = range(x$data.eval).

ylab

Label of y axis of the plot of functional data. Default is "Functional Data".

main

An overall title for the plots (it will be pasted to "Functional Data and F-test" for the first plot and "factor" for the other plots).

lwd

Line width for the plot of functional data. Default is lwd=16.

pch

Point character for the plot of adjusted p-values. Default is pch=16.

...

Additional plotting arguments that can be used with function plot, such as graphical parameters (see par).

Value

No value returned. The function produces a graphical output of the ITP results: the plot of the functional data, functional regression coefficients, and ITP-adjusted p-values of the F-tests on the whole model and on each factor. The basis components selected as significant by the tests at level alpha1 and alpha2 are highlighted in the plot of the corrected p-values and in the one of functional data by gray areas (light and dark gray, respectively). The first plot reports the gray areas corresponding to a significant F-test on the whole model. The remaining plots report the gray areas corresponding to significant F-tests on each factor (with colors corresponding to the levels of the factor).

Author(s)

Alessia Pini, Simone Vantini

References

A. Pini and S. Vantini (2013). The Interval Testing Procedure: Inference for Functional Data Controlling the Family Wise Error Rate on Intervals. MOX-report 13/2013, Politecnico di Milano.

K. Abramowicz, S. De Luna, C. Häger, A. Pini, L. Schelin, and S. Vantini (2015). Distribution-Free Interval-Wise Inference for Functional-on-Scalar Linear Models. MOX-report 3/2015, Politecnico di Milano.

See Also

See also ITPaovbspline to fit and test a functional analysis of variance applying the ITP, and summary.ITPaov for summaries. See plot.ITPlm, plot.ITP1, and plot.ITP2 for the plot method applied to the ITP results of functional-on-scalar linear models, one-population and two-population, respectively.

Examples

# Importing the NASA temperatures data set
data(NASAtemp)

temperature <- rbind(NASAtemp$milan,NASAtemp$paris)
groups <- c(rep(0,22),rep(1,22))

# Performing the ITP
ITP.result <- ITPaovbspline(temperature ~ groups,B=1000,nknots=20,order=3)

# Summary of the ITP results
summary(ITP.result)

# Plot of the ITP results
layout(1)
plot(ITP.result)

# All graphics on the same device
layout(matrix(1:4,nrow=2,byrow=FALSE))
plot(ITP.result,main='NASA data', plot.adjpval = TRUE,xlab='Day',xrange=c(1,365))


fdatest documentation built on May 4, 2022, 9:06 a.m.