Package 'fdatest'

Title: Interval Testing Procedure for Functional Data
Description: Implementation of the Interval Testing Procedure for functional data in different frameworks (i.e., one or two-population frameworks, functional linear models) by means of different basis expansions (i.e., B-spline, Fourier, and phase-amplitude Fourier). The current version of the package requires functional data evaluated on a uniform grid; it automatically projects each function on a chosen functional basis; it performs the entire family of multivariate tests; and, finally, it provides the matrix of the p-values of the previous tests and the vector of the corrected p-values. The functional basis, the coupled or uncoupled scenario, and the kind of test can be chosen by the user. The package provides also a plotting function creating a graphical output of the procedure: the p-value heat-map, the plot of the corrected p-values, and the plot of the functional data.
Authors: Alessia Pini, Simone Vantini
Maintainer: Alessia Pini <[email protected]>
License: GPL-2
Version: 2.1.1
Built: 2024-11-14 03:28:56 UTC
Source: https://github.com/cran/fdatest

Help Index


Interval Testing Procedure for Functional Data

Description

Implementation of the Interval Testing Procedure for functional data in different frameworks (i.e., one or two-population frameworks, functional linear models) by means of different basis expansions (i.e., B-spline, Fourier, and phase-amplitude Fourier). The current version of the package requires functional data evaluated on a uniform grid; it automatically projects each function on a chosen functional basis; it performs the entire family of multivariate tests; and, finally, it provides the matrix of the p-values of the previous tests and the vector of the corrected p-values. The functional basis, the coupled or uncoupled scenario, and the kind of test can be chosen by the user. The package provides also a plotting function creating a graphical output of the procedure: the p-value heat-map, the plot of the corrected p-values, and the plot of the functional data.

Details

Package: fdatest
Type: Package
Version: 2.1.1
Date: 2022-05-04
License: GPL-2

Author(s)

Alessia Pini, Simone Vantini

Maintainer: Alessia Pini <[email protected]>

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 ITP1bspline, ITP1fourier, ITP2bspline, ITP2fourier, ITP2pafourier, ITPlmbspline, ITPaovbspline, and ITPimage.

Examples

# Importing the NASA temperatures data set
data(NASAtemp)

# Example 1: 
# Performing the ITP for one population with the Fourier basis
ITP.result <- ITP1fourier(NASAtemp$milan,maxfrequency=10,B=1000)
# Plotting the results of the ITP
plot(ITP.result)

# Plotting the p-value heatmap
ITPimage(ITP.result)

# Selecting the significant coefficients
which(ITP.result$corrected.pval < 0.05)

# Example 2: 
# Performing the ITP for two populations with the B-spline basis
ITP.result <- ITP2bspline(NASAtemp$milan,NASAtemp$paris,nknots=20,B=1000)
# Plotting the results of the ITP
plot(ITP.result)

# Plotting the p-values heatmap
ITPimage(ITP.result)

# Selecting the significant components for the radius at 5% level
which(ITP.result$corrected.pval < 0.05)


# Example 3:
# Fitting and testing a functional-on-scalar linear model  
# Defining data and covariates 
temperature <- rbind(NASAtemp$milan,NASAtemp$paris)
groups <- c(rep(0,22),rep(1,22))

# Performing the ITP
ITP.result <- ITPlmbspline(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,main='NASA data', plot.adjpval = TRUE,xlab='Day',xrange=c(1,365))

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

One population Interval Testing Procedure with B-spline basis

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

ITP1bspline(data, mu = 0, order = 2, nknots = dim(data)[2], B = 10000)

Arguments

data

Pointwise evaluations of the functional data set on a uniform grid. data 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=10000.

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

Uncorrected 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)).

corrected.pval

Corrected 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).

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

See also ITP1fourier, ITP2bspline, ITP2fourier, ITP2pafourier, and ITPimage.

Examples

# Importing the NASA temperatures data set
data(NASAtemp)
# Performing the ITP for two populations 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 for the radius at 5% level
which(ITP.result$corrected.pval < 0.05)

One population Interval Testing Procedure with Fourier basis

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 Fourier expansion and the significance of each basis coefficient is tested with an interval-wise control of the Family Wise Error Rate.

Usage

ITP1fourier(data, mu = 0, maxfrequency=floor(dim(data)[2]/2), B = 10000)

Arguments

data

Pointwise evaluations of the functional data set on a uniform grid. data 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.

maxfrequency

The maximum frequency to be used in the Fourier basis expansion of data. The default is floor(dim(data)[2]/2), leading to an interpolating expansion.

B

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

Value

ITP1fourier 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 "Fourier".

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 Fourier basis expansion. Rows are associated to units and columns to the basis index: the first column is a0, the following (p-1)/2 columns are the ak coefficients (sine coefficients) and the last (p-1)/2 columns the bk coefficients (cosine coefficients).

pval

Uncorrected p-values for each frequency.

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)).

corrected.pval

Corrected p-values for each frequency.

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).

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

See also ITP1bspline, ITP2bspline, ITP2fourier, ITP2pafourier, and ITPimage.

Examples

# Importing the NASA temperatures data set
data(NASAtemp)
# Performing the ITP
ITP.result <- ITP1fourier(NASAtemp$milan,maxfrequency=20,B=1000)
# 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$corrected.pval < 0.05)

Two populations Interval Testing Procedure with B-spline basis

Description

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 B-spline basis 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

ITP2bspline(data1, data2, mu = 0, 
            order = 2, nknots = dim(data1)[2], B = 10000, paired = FALSE)

Arguments

data1

Pointwise evaluations of the first population's functional data set on a uniform grid. data1 is a matrix of dimensions c(n1,J), with J evaluations on columns and n1 units on rows.

data2

Pointwise evaluations of the second population's functional data set on a uniform grid. data2 is a matrix of dimensions c(n2,J), with J evaluations on columns and n2 units on rows.

mu

The difference between the first functional population and the second functional population 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(data1)[2].

B

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

paired

A logical indicating whether the test is paired. The default is FALSE.

Value

ITP2bspline 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. In this case equal to "B-spline".

test

String vector indicating the type of test performed. In this case equal to "2pop".

mu

Difference between the first functional population and the second functional population under the null hypothesis (as entered by the user).

paired

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

coeff

Matrix of dimensions c(n,p) of the p coefficients of the B-spline basis expansion, with n=n1+n2. Rows are associated to units and columns to the basis index. The first n1 rows report the coefficients of the first population units and the following n2 rows report the coefficients of the second population units

pval

Uncorrected 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)).

corrected.pval

Corrected p-values for each basis coefficient.

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

Heatmap matrix of p-values (used only for plots).

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

For tests of comparison between two populations, see ITP2fourier, ITP2pafourier. For different types of ITP-based tests, see ITP1bspline, ITP1fourier, ITPlmbspline, ITPaovbspline and ITPimage.

Examples

# Importing the NASA temperatures data set
data(NASAtemp)
# Performing the ITP
ITP.result <- ITP2bspline(NASAtemp$milan,NASAtemp$paris,nknots=50,B=1000)

# Plotting the results of the ITP
plot(ITP.result,main='NASA data',xrange=c(1,365),xlab='Day')

# Plotting the p-values heatmap
ITPimage(ITP.result,abscissa.range=c(0,12))

# Selecting the significant components at 5% level
which(ITP.result$corrected.pval < 0.05)

Two populations Interval Testing Procedure with Fourier basis

Description

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 and the significance of each basis coefficient is tested with an interval-wise control of the Family Wise Error Rate.

Usage

ITP2fourier(data1, data2, mu = 0, 
            maxfrequency=floor(dim(data1)[2]/2), B = 10000, paired = FALSE)

Arguments

data1

Pointwise evaluations of the first population's functional data set on a uniform grid. data1 is a matrix of dimensions c(n1,J), with J evaluations on columns and n1 units on rows.

data2

Pointwise evaluations of the second population's functional data set on a uniform grid. data2 is a matrix of dimensions c(n2,J), with J evaluations on columns and n2 units on rows.

mu

The difference between the first functional population and the second functional population 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.

maxfrequency

The maximum frequency to be used in the Fourier basis expansion of data. The default is floor(dim(data1)[2]/2), leading to an interpolating expansion.

B

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

paired

A logical indicating whether the test is paired. The default is FALSE.

Value

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. In this case equal to "Fourier".

test

String vector indicating the type of test performed. in this case equal to "2pop".

mu

Difference between the first functional population and the second functional population under the null hypothesis (as entered by the user).

paired

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

coeff

Matrix of dimensions c(n,p) of the p coefficients of the Fourier basis expansion. Rows are associated to units and columns to the basis index: the first n1 rows report the coefficients of the first population units and the following n2 rows report the coefficients of the second population units; the first column is a0, the following (p-1)/2 columns are the ak coefficients (sine coefficients) and the last (p-1)/2 columns the bk coefficients (cosine coefficients).

pval

Uncorrected p-values for each frequency.

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 frequencies (j,j+1,...,j+(p-i)).

corrected.pval

Corrected p-values 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

Heatmap matrix of p-values (used only for plots).

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

See also ITP2pafourier, ITP2bspline, ITP1fourier, ITP1bspline, and ITPimage.

Examples

# Importing the NASA temperatures data set
data(NASAtemp)
# Performing the ITP
ITP.result <- ITP2fourier(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$corrected.pval < 0.05)

Two populations Interval Testing Procedure with Fourier basis (phase-amplitude decomposition)

Description

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.

Usage

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

Arguments

data1

Pointwise evaluations of the first population's functional data set on a uniform grid. data1 is a matrix of dimensions c(n1,J), with J evaluations on columns and n1 units on rows.

data2

Pointwise evaluations of the second population's functional data set on a uniform grid. data2 is a matrix of dimensions c(n2,J), with J evaluations on columns and n2 units on rows.

maxfrequency

The maximum frequency to be used in the Fourier basis expansion of data. The default is floor(dim(data1)[2]/2), leading to an interpolating expansion.

B

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

paired

A logical indicating whether the test is paired. The default is FALSE.

Value

ITP2pafourier 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 "paFourier".

test

String vector indicating the type of test performed. Equal to "2pop".

paired

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

coeff_phase

Matrix of dimensions c(n,p) of the p phases of the Fourier basis expansion. Rows are associated to units and columns to frequencies: the first n1 rows report the coefficients of the first population units and the following n2 rows report the coefficients of the second population units.

coeff_amplitude

Matrix of dimensions c(n,p) of the p amplitudes of the Fourier basis expansion. Rows are associated to units and columns to frequencies: the first n1 rows report the coefficients of the first population units and the following n2 rows report the coefficients of the second population units.

pval_phase

Uncorrected p-values of the phase tests for each frequency.

pval_amplitude

Uncorrected p-values of the amplitude tests for each frequency.

pval.matrix_phase

Matrix of dimensions c(p,p) of the p-values of the multivariate tests on phase. The element (i,j) of matrix pval.matrix_phase contains the p-value of the joint NPC test of the frequencies (j,j+1,...,j+(p-i)).

pval.matrix_amplitude

Matrix of dimensions c(p,p) of the p-values of the multivariate tests on amplitude. The element (i,j) of matrix pval.matrix_amplitude contains the p-value of the joint NPC test of the frequencies (j,j+1,...,j+(p-i)).

corrected.pval_phase

Corrected p-values of the phase tests for each frequency.

corrected.pval_amplitude

Corrected 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).

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

See also ITP2fourier, ITP2bspline, ITP1fourier, ITP1bspline, and ITPimage.

Examples

# 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$corrected.pval < 0.05)

Interval Testing Procedure for testing Functional analysis of variance with B-spline basis

Description

ITPaovbspline is used to fit and test functional analysis of variance. The function implements the Interval Testing Procedure for testing for significant differences between several functional population evaluated on a uniform grid. Data are represented by means of the B-spline basis 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

ITPaovbspline(formula, order = 2, 
              nknots = dim(model.response(model.frame(formula)))[2], 
              B = 10000, method = "residuals")

Arguments

formula

An object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted.

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 dim(model.response(model.frame(formula)))[2].

B

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

method

Permutation method used to calculate the p-value of permutation tests. Choose "residuals" for the permutations of residuals under the reduced model, according to the Freedman and Lane scheme, and "responses" for the permutation of the responses, according to the Manly scheme.

Value

ITPaovbspline returns an object of class "ITPaov".

The function summary is used to obtain and print a summary of the results.

An object of class "ITPlm" is a list containing at least the following components:

call

The matched call.

design.matrix

The design matrix of the functional-on-scalar linear model.

basis

String vector indicating the basis used for the first phase of the algorithm. In this case equal to "B-spline".

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.

coeff.regr

Matrix of dimensions c(L+1,p) of the p coefficients of the B-spline basis expansion of the intercept (first row) and the L effects of the covariates specified in formula. Columns are associated to the basis index.

pval.F

Uncorrected p-values of the functional F-test for each basis coefficient.

pval.matrix.F

Matrix of dimensions c(p,p) of the p-values of the multivariate F-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)).

corrected.pval.F

Corrected p-values of the functional F-test for each basis coefficient.

pval.factors

Uncorrected p-values of the functional F-tests on each factor of the analysis of variance, separately (rows) and each basis coefficient (columns).

pval.matrix.factors

Array of dimensions c(L+1,p,p) of the p-values of the multivariate F-tests on factors. The element (l,i,j) of array pval.matrix contains the p-value of the joint NPC test on factor l of the components (j,j+1,...,j+(p-i)).

corrected.pval.factors

Corrected p-values of the functional F-tests on each factor of the analysis of variance (rows) and each basis coefficient (columns).

data.eval

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

coeff.regr.eval

Evaluation on a fine uniform grid of the functional regression coefficients.

fitted.eval

Evaluation on a fine uniform grid of the fitted values of the functional regression.

residuals.eval

Evaluation on a fine uniform grid of the residuals of the functional regression.

R2.eval

Evaluation on a fine uniform grid of the functional R-squared of the regression.

heatmap.matrix.F

Heatmap matrix of p-values of functional F-test (used only for plots).

heatmap.matrix.factors

Heatmap matrix of p-values of functional F-tests on each factor of the analysis of variance (used only for plots).

Author(s)

Alessia Pini, Simone Vantini

References

D. Freedman and D. Lane (1983). A Nonstochastic Interpretation of Reported Significance Levels. Journal of Business & Economic Statistics 1.4, 292-298.

B. F. J. Manly (2006). Randomization, Bootstrap and Monte Carlo Methods in Biology. Vol. 70. CRC Press.

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 summary.ITPaov for summaries and plot.ITPaov for plotting the results.

See also ITPlmbspline to fit and test a functional-on-scalar linear model applying the ITP, and ITP1bspline, ITP2bspline, ITP2fourier, ITP2pafourier for one-population and two-population tests.

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))

Plot of the Interval Testing Procedure results

Description

Plotting function creating a graphical output of the ITP: the p-value heat-map, the plot of the corrected p-values, and the plot of the functional data.

Usage

ITPimage(ITP.result, alpha = 0.05, abscissa.range = c(0, 1), nlevel = 20)

Arguments

ITP.result

Results of the ITP, as created by ITP1bspline, ITP1fourier, ITP2bspline, ITP2fourier, and ITP2pafourier.

alpha

Level of the hypothesis test. The default is alpha=0.05.

abscissa.range

Range of the plot abscissa. The default is c(0,1).

nlevel

Number of desired color levels for the p-value heatmap. The default is nlevel=20.

Value

No value returned. The function produces a graphical output of the ITP results: the p-value heatmap, a plot of the corrected p-values and the plot of the functional data. The basis components selected as significant by the test at level alpha are highlighted in the plot of the corrected p-values by a gray area.

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

See plot.ITP1, plot.ITP2, plot.ITPlm, and plot.ITPaov for the plot method applied to the ITP results of one- and two-population tests, linear models, and ANOVA, respectively.

See also ITP1bspline, ITP1fourier, ITP2bspline, ITP2fourier, and ITP2pafourier for applying the ITP.

Examples

# Importing the NASA temperatures data set
data(NASAtemp)

# Performing the ITP for two populations with the B-spline basis
ITP.result <- ITP2bspline(NASAtemp$milan,NASAtemp$paris,nknots=20,B=1000)

# Plotting the results of the ITP
ITPimage(ITP.result,abscissa.range=c(0,12))

# Selecting the significant components for the radius at 5% level
which(ITP.result$corrected.pval < 0.05)

Interval Testing Procedure for testing Functional-on-Scalar Linear Models with B-spline basis

Description

ITPlmbspline is used to fit and test functional linear models. It can be used to carry out regression, and analysis of variance. The function implements the Interval Testing Procedure for testing the significance of the effects of scalar covariates on a functional population evaluated on a uniform grid. Data are represented by means of the B-spline basis 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

ITPlmbspline(formula, order = 2, 
             nknots = dim(model.response(model.frame(formula)))[2], 
             B = 10000, method = "residuals")

Arguments

formula

An object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted.

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 dim(model.response(model.frame(formula)))[2].

B

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

method

Permutation method used to calculate the p-value of permutation tests. Choose "residuals" for the permutations of residuals under the reduced model, according to the Freedman and Lane scheme, and "responses" for the permutation of the responses, according to the Manly scheme.

Value

ITPlmbspline returns an object of class "ITPlm".

The function summary is used to obtain and print a summary of the results.

An object of class "ITPlm" is a list containing at least the following components:

call

The matched call.

design.matrix

The design matrix of the functional-on-scalar linear model.

basis

String vector indicating the basis used for the first phase of the algorithm. In this case equal to "B-spline".

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.

coeff.regr

Matrix of dimensions c(L+1,p) of the p coefficients of the B-spline basis expansion of the intercept (first row) and the L effects of the covariates specified in formula. Columns are associated to the basis index.

pval.F

Uncorrected p-values of the functional F-test for each basis coefficient.

pval.matrix.F

Matrix of dimensions c(p,p) of the p-values of the multivariate F-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)).

corrected.pval.F

Corrected p-values of the functional F-test for each basis coefficient.

pval.t

Uncorrected p-values of the functional t-tests for each partial regression coefficient including the intercept (rows) and each basis coefficient (columns).

pval.matrix.t

Array of dimensions c(L+1,p,p) of the p-values of the multivariate t-tests. The element (l,i,j) of array pval.matrix contains the p-value of the joint NPC test on covariate l of the components (j,j+1,...,j+(p-i)).

corrected.pval.t

Corrected p-values of the functional t-tests for each partial regression coefficient including the intercept (rows) and each basis coefficient (columns).

data.eval

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

coeff.regr.eval

Evaluation on a fine uniform grid of the functional regression coefficients.

fitted.eval

Evaluation on a fine uniform grid of the fitted values of the functional regression.

residuals.eval

Evaluation on a fine uniform grid of the residuals of the functional regression.

R2.eval

Evaluation on a fine uniform grid of the functional R-squared of the regression.

heatmap.matrix.F

Heatmap matrix of p-values of functional F-test (used only for plots).

heatmap.matrix.t

Heatmap matrix of p-values of functional t-tests (used only for plots).

Author(s)

Alessia Pini, Simone Vantini

References

D. Freedman and D. Lane (1983). A Nonstochastic Interpretation of Reported Significance Levels. Journal of Business & Economic Statistics 1.4, 292-298.

B. F. J. Manly (2006). Randomization, Bootstrap and Monte Carlo Methods in Biology. Vol. 70. CRC Press.

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 summary.ITPlm for summaries and plot.ITPlm for plotting the results.

See also ITPaovbspline to fit and test a functional analysis of variance applying the ITP, and ITP1bspline, ITP2bspline, ITP2fourier, ITP2pafourier for one-population and two-population tests.

Examples

# Importing the NASA temperatures data set
data(NASAtemp)

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

# Performing the ITP
ITP.result <- ITPlmbspline(temperature ~ groups,B=1000,nknots=20)
# Summary of the ITP results
summary(ITP.result)

# Plot of the ITP results
layout(1)
plot(ITP.result,main='NASA data', plot.adjpval = TRUE,xlab='Day',xrange=c(1,365))

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

NASA daily temperatures data set

Description

It contains the daily mean temperatures registered from July 1983 to June 2005 and stored in the NASA database Earth Surface Meteorology for Solar Energy of two different geographical locations: the region (45-46 North, 9-10 East), including the city of Milan (Italy), and the region (48-49 North, 2-3 East), including the city of Paris (France).

Usage

data(NASAtemp)

Format

List of 2 elements:

  • milan Matrix of dimensions c(22,365) containing the daily mean temperatures of the region (45-46 North, 9-10 East), including the city of Milan (Italy) registered from July 1983 to June 2005 (22 years).

  • paris Matrix of dimensions c(22,365) containing the daily mean temperatures of the region (48-49 North, 2-3 East), including the city of Paris (France) registered from July 1983 to June 2005 (22 years).

Source

These data were obtained from the NASA Langley Research Center Atmospheric Science Data Center Surface meteorological and Solar Energy (SSE) web portal supported by the NASA LaRC POWER Project. Data are freely available at: NASA Surface Meteorology and Solar Energy, A Renewable Energy Resource web site (release 6.0): http://eosweb.larc.nasa.gov

Examples

data(NASAtemp)
## Not run: 

matplot(t(NASAtemp$milan),type='l')
matplot(t(NASAtemp$paris),type='l')


## End(Not run)

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)

Plotting ITP results for two-population tests

Description

plot method for class "ITP2". Plotting function creating a graphical output of the ITP for the test of comparison between two populations: functional data and ITP-adjusted p-values are plotted.

Usage

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

Arguments

x

The object to be plotted. An object of class "ITP2", that is, a result of an ITP for comparison between two populations. Usually a call to ITP2bspline, ITP2fourier or ITP2pafourier.

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). In the case of a Fourier basis with amplitude and phase decomposition, two plots of adjusted p-values are done, one for phase and one for amplitude.

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 ITP2bspline, ITP2fourier, ITP2pafourier to perform the ITP to test for differences between two populations. See plot.ITP1 and plot.ITPlm for the plot method applied to the ITP results of one-population tests and a linear models, respectively.

Examples

# Importing the NASA temperatures data set
data(NASAtemp)

# Performing the ITP for two populations with the B-spline basis
ITP.result.bspline <- ITP2bspline(NASAtemp$milan,NASAtemp$paris,nknots=30,B=1000)
# Plotting the results of the ITP
plot(ITP.result.bspline,xlab='Day',xrange=c(1,365),main='NASA data')

# Selecting the significant components for the radius at 5% level
which(ITP.result.bspline$corrected.pval < 0.05)

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))

Plotting ITP results for functional-on-scalar linear model testing

Description

plot method for class "ITPlm". Plotting function creating a graphical output of the ITP for the test on a functional-on-scalar linear model: functional data, functional coefficients and ITP-adjusted p-values for the F-test and t-tests are plotted.

Usage

## S3 method for class 'ITPlm'
plot(x, xrange = c(0, 1), alpha1 = 0.05, alpha2 = 0.01, 
     plot.adjpval = FALSE, col = c(1, rainbow(dim(x$corrected.pval.t)[1])), 
     ylim = range(x$data.eval), ylab = "Functional Data", 
     main = NULL, lwd = 1, pch = 16, ...)

Arguments

x

The object to be plotted. An object of class "ITPlm", usually, a result of a call to ITPlmbspline.

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

Vector of colors for the plot of functional data (first element), and functional coefficients (following elements).

Default is col = c(1, rainbow(dim(x$corrected.pval.t)[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 "t-test" 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 for the F-test and t-tests. 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 plot of functional data reports the gray areas corresponding to a significant F-test. The plots of functional regression coefficients report the gray areas corresponding to significant t-tests for the corresponding covariate.

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 ITPlmbspline to fit and test a functional-on-scalar linear model applying the ITP, and summary.ITPlm for summaries. See plot.ITPaov, plot.ITP1, and plot.ITP2 for the plot method applied to the ITP results of functional analysis of variance, one-population and two-population, respectively.

Examples

# Importing the NASA temperatures data set
data(NASAtemp)

data <- rbind(NASAtemp$milan,NASAtemp$paris)
lab <- c(rep(0,22),rep(1,22))

# Performing the ITP
ITP.result <- ITPlmbspline(data ~ lab,B=1000,nknots=20,order=3)
# Summary of the ITP results
summary(ITP.result)

# Plot of the ITP results
layout(1)
plot(ITP.result,main='NASA data',xlab='Day',xrange=c(1,365))

# Plots of the adjusted p-values
plot(ITP.result,main='NASA data', plot.adjpval = TRUE,xlab='Day',xrange=c(1,365))

# To have all plots in one device
layout(matrix(1:6,nrow=3,byrow=FALSE))
plot(ITP.result,main='NASA data', plot.adjpval = TRUE,xlab='Day',xrange=c(1,365))

Summarizing Functional Analysis of Variance Fits

Description

summary method for class "ITPaov".

Usage

## S3 method for class 'ITPaov'
summary(object, ...)

Arguments

object

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

...

Further arguments passed to or from other methods.

Value

The function summary.ITPaov computes and returns a list of summary statistics of the fitted functional analysis of variance given in object, using the component "call" from its arguments, plus:

factors

A L x 1 matrix with columns for the factors of ANOVA, and corresponding (two-sided) ITP-adjusted minimum p-values of the corresponding tests of significance (i.e., the minimum p-value over all p basis components used to describe functional data).

R2

Range of the functional R-squared.

ftest

ITP-adjusted minimum p-value of functional F-test.

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 ITPaovbspline for fitting and testing the functional ANOVA and plot.ITPaov for plots. See also ITPlmbspline, ITP1bspline, ITP2bspline, ITP2fourier, ITP2pafourier.

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)

Summarizing Functional-on-Scalar Linear Model Fits

Description

summary method for class "ITPlm".

Usage

## S3 method for class 'ITPlm'
summary(object, ...)

Arguments

object

An object of class "ITPlm", usually, a result of a call to ITPlmbspline.

...

Further arguments passed to or from other methods.

Value

The function summary.ITPlm computes and returns a list of summary statistics of the fitted functional-on-scalar linear model given in object, using the component "call" from its arguments, plus:

ttest

A L+1 x 1 matrix with columns for the functional regression coefficients, and corresponding (two-sided) ITP-adjusted minimum p-values of t-tests (i.e., the minimum p-value over all p basis components used to describe functional data).

R2

Range of the functional R-squared.

ftest

ITP-adjusted minimum p-value of functional F-test.

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 ITPlmbspline for fitting and testing the functional linear model and plot.ITPlm for plots. See also ITPaovbspline, ITP1bspline, ITP2bspline, ITP2fourier, ITP2pafourier.

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 <- ITPlmbspline(temperature ~ groups, B=1000,nknots=20)

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