Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

flm.Ftest

F-test for the Functional Linear Model with scalar response


Description

The function flm.Ftest tests the null hypothesis of no interaction between a functional covariate and a scalar response inside the Functional Linear Model (FLM): Y=<X,β>+ε. The null hypothesis is H_0: β=0 and the alternative is H_1: β\neq 0. The null hypothesis is tested by a functional extension of the classical F-test (see Details).

Usage

Ftest.statistic(X.fdata, Y)

flm.Ftest(X.fdata, Y, B = 5000, verbose = TRUE)

Arguments

X.fdata

Functional covariate for the FLM. The object must be in the class fdata.

Y

Scalar response for the FLM. Must be a vector with the same number of elements as functions are in X.fdata.

B

Number of bootstrap replicates to calibrate the distribution of the test statistic. B=5000 replicates are the recommended for carry out the test, although for exploratory analysis (not inferential), an acceptable less time-consuming option is B=500.

verbose

Either to show or not information about computing progress.

Details

The Functional Linear Model with scalar response (FLM), is defined as Y=<X,β>+ε, for a functional process X such that E[X(t)]=0, E[X(t)ε]=0 for all t and for a scalar variable Y such that E[Y]=0. The functional F-test is defined as

||\frac{1}{n} ∑_{i=1}^n (X_i-\bar X)(Y_i-\bar Y)||,

where \bar X is the functional mean of X, \bar Y is the ordinary mean of Y and ||.|| is the L^2 functional norm. The statistic is computed with the function Ftest.statistic. The distribution of the test statistic is approximated by a wild bootstrap resampling on the residuals, using the golden section bootstrap.

Value

The value for Ftest.statistic is simply the F-test statistic. The value for flm.Ftest is an object with class "htest" whose underlying structure is a list containing the following components:

  • statistic The value of the F-test statistic.

  • boot.statistics A vector of length B with the values of the bootstrap F-test statistics.

  • p.value The p-value of the test.

  • method The character string "Functional Linear Model F-test".

  • B The number of bootstrap replicates used.

  • data.name The character string "Y=<X,0>+e"

Note

No NA's are allowed neither in the functional covariate nor in the scalar response.

Author(s)

Eduardo Garcia-Portugues. Please, report bugs and suggestions to egarcia@math.ku.dk

References

Garcia-Portugues, E., Gonzalez-Manteiga, W. and Febrero-Bande, M. (2014). A goodness–of–fit test for the functional linear model with scalar response. Journal of Computational and Graphical Statistics, 23(3), 761-778. http://dx.doi.org/10.1080/10618600.2013.812519

Gonzalez-Manteiga, W., Gonzalez-Rodriguez, G., Martinez-Calvo, A. and Garcia-Portugues, E. Bootstrap independence test for functional linear models. arXiv:1210.1072. http://arxiv.org/abs/1210.1072

See Also

Examples

## Not run: 
## Simulated example ##
X=rproc2fdata(n=50,t=seq(0,1,l=101),sigma="OU")
beta0=fdata(mdata=rep(0,length=101)+rnorm(101,sd=0.05),
argvals=seq(0,1,l=101),rangeval=c(0,1))
beta1=fdata(mdata=cos(2*pi*seq(0,1,l=101))-(seq(0,1,l=101)-0.5)^2+
rnorm(101,sd=0.05),argvals=seq(0,1,l=101),rangeval=c(0,1))

# Null hypothesis holds
Y0=drop(inprod.fdata(X,beta0)+rnorm(50,sd=0.1))
# Null hypothesis does not hold
Y1=drop(inprod.fdata(X,beta1)+rnorm(50,sd=0.1))

# Do not reject H0
flm.Ftest(X,Y0,B=100)
flm.Ftest(X,Y0,B=5000)

# Reject H0
flm.Ftest(X,Y1,B=100)
flm.Ftest(X,Y1,B=5000)

## End(Not run)

fda.usc

Functional Data Analysis and Utilities for Statistical Computing

v2.0.2
GPL-2
Authors
Manuel Febrero Bande [aut], Manuel Oviedo de la Fuente [aut, cre], Pedro Galeano [ctb], Alicia Nieto [ctb], Eduardo Garcia-Portugues [ctb]
Initial release
2020-02-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.