fda.usc (version 2.0.2)

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=\big<X,\beta\big>+\epsilon\). The null hypothesis is \(H_0:\,\beta=0\) and the alternative is \(H_1:\,\beta\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)

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"

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.

Author

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

Details

The Functional Linear Model with scalar response (FLM), is defined as \(Y=\big<X,\beta\big>+\epsilon\), for a functional process \(X\) such that \(E[X(t)]=0\), \(E[X(t)\epsilon]=0\) for all \(t\) and for a scalar variable \(Y\) such that \(E[Y]=0\). The functional F-test is defined as $$T_n=\bigg\|\frac{1}{n}\sum_{i=1}^n (X_i-\bar X)(Y_i-\bar Y)\bigg\|,$$ where \(\bar X\) is the functional mean of \(X\), \(\bar Y\) is the ordinary mean of \(Y\) and \(\|\cdot\|\) 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.

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

rwild, flm.test, dfv.test

Examples

Run this code
if (FALSE) {
## 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)
}

Run the code above in your browser using DataCamp Workspace