Description Usage Arguments Value References
View source: R/MakeFunRegBasis.r
This is a function for internal use (i.e., a user will not need to call it directly for usual data analysis tasks). Recall that functional coefficients are estimated as a linear combination of basis functions, thus changing a nonparametric into a parametric estimation problem. This function constructs the matrix of basis function values for doing a functional regression.
1 | make.funreg.basis(basis.type, deg, num.knots, times)
|
basis.type |
is a character string, either |
deg |
is the degree of the basis functions (roughly, their amount of complexity) and should generally be 1, 2, or 3. |
num.knots |
is the number of knots in the basis; the higher this is, the more flexible the estimated function will be. If it is too low, the estimated function may be too simple (i.e.,biased towards being too smooth). If it is too high, the function may be hard to interpret. |
times |
is the vector of measurement times (more technically, real-valued index values for the functional covariate) at which the basis functions should be evaluated. |
Returns a list with two components. The first,
interior.knot.locations
, tells the selected locations on the time
axis for each interior knot. The second, basis.for.betafn
,
is a matrix with one row for each time value in the input vector
times
and one column for each basis function. It represents
the values of the basis functions themselves.
Eilers, P. H. C., and Marx, B. D. (1996). Flexible smoothing with B-splines and penalties (with comments and rejoinder). Statistical Science, 11, 89-121.
Ruppert, D., Wand, M. P., and Carroll, R. J. (2003) Semiparametric regression. Cambridge: Cambridge.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.