plot.ITP1: Plotting ITP results for one-population tests

View source: R/plot.ITP1.R

plot.ITP1R Documentation

Plotting ITP results for one-population tests

Description

plot method for class "ITP1". Plotting function creating a graphical output of the ITP for the test of the mean of one population: functional data and ITP-adjusted p-values are plotted.

Usage

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

Arguments

x

The object to be plotted. An object of class "ITP1", that is, a result of an ITP for comparison between two populations. Usually a call to ITP1bspline or ITP1fourier.

xrange

Range of the x axis.

alpha1

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

alpha2

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

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" for the first plot and "adjusted p-values" for the second plot).

lwd

Line width for the plot of functional data.

col

Color used to plot the functional data.

pch

Point character for the plot of adjusted p-values.

ylim

Range of the y axis.

...

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 and the one of the adjusted p-values. The basis components selected as significant by the test at level alpha1 and alpha2 are highlighted in the plot of the corrected p-values and in the one of functional data (in case the test is based on a local basis, such as B-splines) by gray areas (light and dark gray, respectively).

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.

See Also

ITPimage for the plot of p-values heatmaps.

See also ITP1bspline and ITP1fourier to perform the ITP to test for the mean of a functional populations. See plot.ITP2 and plot.ITPlm for the plot method applied to the ITP results of two-population tests and linear models, respectively.

Examples


# Importing the NASA temperatures data set
data(NASAtemp)

# Performing the ITP for one population with the B-spline basis
ITP.result.bspline <- ITP1bspline(NASAtemp$paris,mu=4,nknots=50,B=1000)
# Plotting the results of the ITP
plot(ITP.result.bspline,xlab='Day',xrange=c(0,365),main='NASA data')
# Selecting the significant components for the radius at 5% level
which(ITP.result.bspline$corrected.pval < 0.05)



alessiapini/fdatest documentation built on April 23, 2024, 2:31 a.m.