Description Usage Arguments Value References See Also Examples

View source: R/ITP2pafourier.R

The function implements the Interval Testing Procedure for testing the difference between two functional populations evaluated on a uniform grid. Data are represented by means of the Fourier basis expansion with the phase-amplitude decomposition and the significance of the amplitude and phase of each frequency is tested with an interval-wise control of the Family Wise Error Rate.

1 2 | ```
ITP2pafourier(data1, data2, maxfrequency = floor(dim(data1)[2]/2),
B = 10000, paired = FALSE)
``` |

`data1` |
Pointwise evaluations of the first population's functional data set on a uniform grid. |

`data2` |
Pointwise evaluations of the second population's functional data set on a uniform grid. |

`maxfrequency` |
The maximum frequency to be used in the Fourier basis expansion of data. The default is |

`B` |
The number of iterations of the MC algorithm to evaluate the p-values of the permutation tests. The defualt is |

`paired` |
A logical indicating whether the test is paired. The default is |

`ITP2fourier`

returns an object of `class`

"`ITP2`

".
An object of class "`ITP2`

" is a list containing at least the following components:

`basis` |
String vector indicating the basis used for the first phase of the algorithm. Equal to |

`test` |
String vector indicating the type of test performed. Equal to |

`paired` |
Logical indicating whether the test is paired (as entered by the user). |

`coeff_phase` |
Matrix of dimensions |

`coeff_amplitude` |
Matrix of dimensions |

`pval_phase` |
Unadjusted p-values of the phase tests for each frequency. |

`pval_amplitude` |
Unadjusted p-values of the amplitude tests for each frequency. |

`pval.matrix_phase` |
Matrix of dimensions |

`pval.matrix_amplitude` |
Matrix of dimensions |

`adjusted.pval_phase` |
Adjusted p-values of the phase tests for each frequency. |

`adjusted.pval_amplitude` |
Adjusted p-values of the amplitude tests for each frequency. |

`labels` |
Labels indicating the population membership of each data. |

`data.eval` |
Evaluation on a fine uniform grid of the functional data obtained through the basis expansion. |

`heatmap.matrix_phase` |
Heatmap matrix of p-values for phase (used only for plots). |

`heatmap.matrix_amplitude` |
Heatmap matrix of p-values for amplitude (used only for plots). |

A. Pini and S. Vantini (2017). The Interval Testing Procedure: Inference for Functional Data Controlling the Family Wise Error Rate on Intervals. Biometrics 73(3): 835–845.

See also `plot.ITP2`

and `ITPimage`

for plotting the results,
`ITP2bspline`

for ITP based on B-spline basis, `ITP2fourier`

for Fourier basis
(without phase and amplitude decomposition), and `IWT2`

for a two-sample test that is not based on
an a-priori selected basis expansion.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
# Importing the NASA temperatures data set
data(NASAtemp)
# Performing the ITP
ITP.result <- ITP2pafourier(NASAtemp$milan,NASAtemp$paris,maxfrequency=20,B=1000,paired=TRUE)
# Plotting the results of the ITP
plot(ITP.result,main='NASA data',xrange=c(1,365),xlab='Day')
# Plotting the p-value heatmap
ITPimage(ITP.result,abscissa.range=c(1,365))
# Selecting the significant coefficients
which(ITP.result$adjusted.pval < 0.05)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.