funeigen: Perform eigenfunction decomposition on functional covariate

Description Usage Arguments Note References See Also

View source: R/FunEigen.r


A function to do the eigenfunction decomposition as part of a penalized functional regression as in Goldsmith et al. (2011)


funeigen(id, time, x, num.bins = 35, preferred.num.eigenfunctions = 30)



A vector of subject ID's.


A vector of measurement times.


A single functional predictor represented as a vector or a one-column matrix.


The number of knots used in the spline basis for the beta function. The default is based on the Goldsmith et al. (2011) sample code.


The number of eigenfunctions to use in approximating the covariance function of x (see Goldsmith et al., 2011)


The algorithm for this function follows that of "sparse_simulation.R", which was written on Nov. 13, 2009, by Jeff Goldsmith; Goldsmith noted that he used some code from Chongzhi Di for the part about handling sparsity. "sparse_simulation.R" was part of the supplementary material for Goldsmith, Bobb, Crainiceanu, Caffo, and Reich (2011). The num.bins parameter corresponds to in Goldsmith et al, sparse_simulation.R and preferred.num.eigenfunctions corresponds to Kz in Goldsmith et al.


Goldsmith, J., Bobb, J., Crainiceanu, C. M., Caffo, B., and Reich, D. (2011). Penalized functional regression. Journal of Computational and Graphical Statistics, 20(4), 830-851. DOI: 10.1198/jcgs.2010.10007.

See Also

fitted.funeigen, link{plot.funeigen}

funreg documentation built on Oct. 4, 2021, 5:07 p.m.

Related to funeigen in funreg...