Description Usage Arguments Value Author(s) References Examples
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:
r.cfs.2003
implements examples (a) and (b) in Section 5 of Cardot et al. (2003).
r.hh.2006
gives models (i), (ii) and (iii) in Section 5 of Hall and Hosseini-Nasab (2006).
r.bridge
samples a Brownian motion and creates a functional coefficient constructed from the eigenfunctions √2 * sin(k*t*π).
1 2 3 4 5 6 |
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 |
imod |
either |
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.
Manuel Febrero-Bande (manuel.febrero@usc.es) and Eduardo García-Portugués (edgarcia@est-econ.uc3m.es).
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
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.