lofocv | R Documentation |
This internal function, called by fosr()
when method="OLS"
,
performs efficient leave-one-function-out cross-validation using
Demmler-Reinsch orthogonalization to choose the smoothing parameter.
lofocv(Y, X, S1, argvals, lamvec = NULL, constr = NULL, maxlam = NULL)
Y |
matrix of responses, e.g. with columns corresponding to basis function coefficients. |
X |
model matrix. |
S1 |
penalty matrix. |
argvals |
values where the functions are evaluated |
lamvec |
vector of candidate smoothing parameter values. If
|
constr |
matrix of linear constraints. |
maxlam |
maximum smoothing parameter value to consider (when
|
if lamvec=NULL
, a list (returned by optimize
) with
elements minimum
and objective
giving, respectively, the
chosen smoothing parameter and the associated cross-validation score.
Otherwise a 2-column table with the candidate smoothing parameters in the
first column and the corresponding cross-validation scores in the second.
Philip Reiss phil.reiss@nyumc.org and Lei Huang
fosr
, pwcv
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.