# ITP1bspline: One population Interval Testing Procedure with B-spline basis In alessiapini/fdatest: Interval Wise Testing for Functional Data

## Description

The function implements the Interval Testing Procedure for testing the center of symmetry of a functional population evaluated on a uniform grid. Data are represented by means of the B-spline expansion and the significance of each basis coefficient is tested with an interval-wise control of the Family Wise Error Rate. The default parameters of the basis expansion lead to the piece-wise interpolating function.

## Usage

 `1` ```ITP1bspline(data, mu = 0, order = 2, nknots = dim(data)[2], B = 1000) ```

## Arguments

 `data` Pointwise evaluations of the functional data set on a uniform grid. It is a matrix of dimensions `c(n,J)`, with `J` evaluations on columns and `n` units on rows. `mu` The center of symmetry under the null hypothesis: either a constant (in this case, a constant function is used) or a `J`-dimensional vector containing the evaluations on the same grid which `data` are evaluated. The default is `mu=0`. `order` Order of the B-spline basis expansion. The default is `order=2`. `nknots` Number of knots of the B-spline basis expansion. The default is `nknots=dim(data)[2]`. `B` The number of iterations of the MC algorithm to evaluate the p-values of the permutation tests. The defualt is `B=1000`.

## Value

`ITP1bspline` returns an object of `class` "`ITP1`". An object of class "`ITP1`" is a list containing at least the following components:

 `basis` String vector indicating the basis used for the first phase of the algorithm. In this case equal to `"B-spline"`. `test` String vector indicating the type of test performed. In this case equal to `"1pop"`. `mu` Center of symmetry under the null hypothesis (as entered by the user). `coeff` Matrix of dimensions `c(n,p)` of the `p` coefficients of the B-spline basis expansion. Rows are associated to units and columns to the basis index. `pval` Unadjusted p-values for each basis coefficient. `pval.matrix` Matrix of dimensions `c(p,p)` of the p-values of the multivariate tests. The element `(i,j)` of matrix `pval.matrix` contains the p-value of the joint NPC test of the components `(j,j+1,...,j+(p-i))`. `adjusted.pval` Adjusted p-values for each basis coefficient. `labels` Labels indicating the population membership of each data (in this case always equal to `1`). `data.eval` Evaluation on a fine uniform grid of the functional data obtained through the basis expansion. `heatmap.matrix` Heatmap matrix of p-values (used only for plots).

## References

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.ITP1` and `ITPimage` for plotting the results, `ITP1fourier` for ITP based on Fourier basis, `IWT1` for a one-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 for one population with the B-spline basis ITP.result <- ITP1bspline(NASAtemp\$paris,mu=4,nknots=50,B=1000) # Plotting the results of the ITP plot(ITP.result,xrange=c(0,12),main='Paris temperatures') # Plotting the p-value heatmap ITPimage(ITP.result,abscissa.range=c(0,12)) # Selecting the significant components at 5% level which(ITP.result\$adjusted.pval < 0.05) ```