Description Usage Arguments Note References See Also

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

1 |

`id` |
A vector of subject ID's. |

`time` |
A vector of measurement times. |

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

`num.bins` |
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. |

`preferred.num.eigenfunctions` |
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 `N.fit`

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.

`fitted.funeigen`

, `link{plot.funeigen}`

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.