Description Usage Arguments Details Author(s)
Does kfold crossvalidation for shim and determines the optimal pair of tuning parameters (λ_β and λ_γ)
1 2 3 4 
x 
Design matrix of dimension 
y 
response variable. For 
main.effect.names 
character vector of main effects names. MUST be
ordered in the same way as the column names of 
interaction.names 
character vector of interaction names. MUST be
separated by a colon (e.g. x1:x2), AND MUST be ordered in the same way as
the column names of 
weights 
observation weights. Can be total counts if responses are proportion matrices. Default is 1 for each observation. Currently NOT IMPLEMENTED 
lambda.beta 
sequence of tuning parameters for the main effects. If

lambda.gamma 
sequence of tuning parameters for the interaction
effects. Default is 
nlambda.gamma 
number of tuning parameters for gamma. This needs to be specified even for user defined inputs 
nlambda.beta 
number of tuning parameters for beta. This needs to be specified even for user defined inputs 
nlambda 
total number of tuning parameters. If 
parallel 
If 
type.measure 
loss to use for crossvalidation. Currently only 1
option. The default is 
nfolds 
number of folds  default is 10. Although nfolds can be as
large as the sample size (leaveoneout CV), it is not recommended for
large datasets. Smallest value allowable is 
The function runs shim nfolds+1 times; the first to get the tuning
parameter sequences, and then the remainder to compute the fit with each of
the folds omitted. The error is accumulated, and the average error and
standard deviation over the folds is computed. Note also that the results
of cv.shim are random, since the folds are selected at random using the
createfolds
function. Users can reduce this randomness by
running cv.shim many times, and averaging the error curves.
Sahir Bhatnagar
Maintainer: Sahir Bhatnagar [email protected]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.