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)
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.
fitted.funeigen
, link{plot.funeigen}