| pwcv {refund} | R Documentation |
Pointwise cross-validation for function-on-scalar regression
Description
Estimates prediction error for a function-on-scalar regression model by leave-one-function-out cross-validation (CV), at each of a specified set of points.
Usage
pwcv(
fdobj,
Z,
L = NULL,
lambda,
eval.pts = seq(min(fdobj$basis$range), max(fdobj$basis$range), length.out = 201),
scale = FALSE
)
Arguments
fdobj |
a functional data object (class |
Z |
the model matrix, whose columns represent scalar predictors. |
L |
a row vector or matrix of linear contrasts of the coefficient functions, to be restricted to equal zero. |
lambda |
smoothing parameter: either a nonnegative scalar or a vector,
of length |
eval.pts |
argument values at which the CV score is to be evaluated. |
scale |
logical value or vector determining scaling of the matrix
|
Details
Integrating the pointwise CV estimate over the function domain yields the
cross-validated integrated squared error, the standard overall model
fit score returned by lofocv.
It may be desirable to derive the value of lambda from an
appropriate call to fosr, as in the example below.
Value
A vector of the same length as eval.pts giving the CV
scores.
Author(s)
Philip Reiss phil.reiss@nyumc.org
References
Reiss, P. T., Huang, L., and Mennes, M. (2010). Fast function-on-scalar regression with penalized basis expansions. International Journal of Biostatistics, 6(1), article 28. Available at https://pubmed.ncbi.nlm.nih.gov/21969982/