Description Usage Arguments Details Value Author(s) References See Also
Internal function to conduct kfold crossvalidation for glmreg, produces a plot,
and returns crossvalidated loglikelihood values for lambda
1 2 3 
x 

y 
response 
weights 
Observation weights; defaults to 1 per observation 
lambda 
Optional usersupplied lambda sequence; default is

balance 
for 
family 
response variable distribution 
nfolds 
number of folds >=3, default is 10 
foldid 
an optional vector of values between 1 and 
plot.it 
a logical value, to plot the estimated loglikelihood values if 
se 
a logical value, to plot with standard errors. 
n.cores 
The number of CPU cores to use. The crossvalidation loop will attempt to send different CV folds off to different cores. 
... 
Other arguments that can be passed to 
The function runs glmreg
nfolds
+1 times; the
first to compute the lambda
sequence, and then to
compute the fit with each of the folds omitted. The error or the loglikelihood value is
accumulated, and the average value and standard deviation over the
folds is computed. Note that cv.glmreg
can be used to search for
values for alpha
: it is required to call cv.glmreg
with a fixed vector foldid
for different values of alpha
.
an object of class "cv.glmreg"
is returned, which is a
list with the ingredients of the crossvalidation fit.
fit 
a fitted glmreg object for the full data. 
residmat 
matrix of loglikelihood values with row values for 
cv 
The mean crossvalidated loglikelihood values  a vector of length

cv.error 
estimate of standard error of 
foldid 
an optional vector of values between 1 and 
lambda 
a vector of 
lambda.which 
index of 
lambda.optim 
value of 
Zhu Wang <zwang@connecticutchildrens.org>
Zhu Wang, Shuangge Ma, Michael Zappitelli, Chirag Parikh, ChingYun Wang and Prasad Devarajan (2014) Penalized Count Data Regression with Application to Hospital Stay after Pediatric Cardiac Surgery, Statistical Methods in Medical Research. 2014 Apr 17. [Epub ahead of print]
glmreg
and plot
, predict
, and coef
methods for "cv.glmreg"
object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.