pwcv | R Documentation |
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.
pwcv(
fdobj,
Z,
L = NULL,
lambda,
eval.pts = seq(min(fdobj$basis$range), max(fdobj$basis$range), length.out = 201),
scale = FALSE
)
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
|
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.
A vector of the same length as eval.pts
giving the CV
scores.
Philip Reiss phil.reiss@nyumc.org
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/
fosr
, lofocv
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.