r.cfs.2003: Utilities for the simulation of functional linear models

Description Usage Arguments Value Author(s) References Examples

View source: R/models.R

Description

The functions r.cfs.2003, r.hh.2006 and r.bridge sample the functional covariate and construct functional coefficients for their use in functional linear models:

Usage

1
2
3
4
5
6
r.cfs.2003(n, t = seq(0, 1, len = 201), b = c(2, 4, 5)/sqrt(2),
  type = c("a", "b")[1])

r.hh.2006(n, t = seq(0, 1, len = 201), imod = 1)

r.bridge(n, t = seq(0, 1, len = 201), b = c(2, 4, 5)/sqrt(2))

Arguments

n

number of functions to sample.

t

time locations for the functional data.

b

coefficients of the functional coefficient in the theoretical basis of principal components of the Brownian motion.

type

either example "a" or "b" from Cardot et al. (2003).

imod

either 1, 2 or 3 for denoting models (i), (ii) and (iii) in Hall and Hosseini-Nasab (2006).

Value

A list with the following elements:

X.fdata

the sample of functional data, an fdata object of length n.

beta.fdata

the functional coefficient, an fdata object.

Author(s)

Manuel Febrero-Bande (manuel.febrero@usc.es) and Eduardo García-Portugués (edgarcia@est-econ.uc3m.es).

References

Cardot, H., Ferraty, F., Sarda, P. (2003) Spline estimators for the functional linear model. Statistica Sinica, 13(3), 571–592. http://www3.stat.sinica.edu.tw/statistica/oldpdf/a13n31.pdf

Hall, P. and Hosseini-Nasab, M. (2006) On properties of functional principal components analysis. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 68(1), 109–126. http://dx.doi.org/10.1111/j.1467-9868.2005.00535.x

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Cardot et al. (2003)
plot(r.cfs.2003(n = 100, type = "a")$X.fdata)
plot(r.cfs.2003(n = 100, type = "b")$X.fdata)

# Hall and Hosseini-Nasab (2006)
plot(r.hh.2006(n = 100, imod = 1)$X.fdata)
plot(r.hh.2006(n = 100, imod = 2)$X.fdata)
plot(r.hh.2006(n = 100, imod = 3)$X.fdata)

# Sample bridge
plot(r.bridge(n = 100)$X.fdata)

egarpor/rp.flm.test documentation built on Oct. 20, 2021, 12:31 a.m.