Description Usage Arguments Details Value Author(s) References Examples
Does kfold crossvalidation for glmTLP, produces a plot, and returns a value for lambda
with prespecified tau
.
1 2 3 4 5 6 7  cv.glmTLP(x, y, family=c("gaussian","binomial","poisson","multinomial","cox","mgaussian"),
nfolds = 10, weights, offset=NULL, lambda, tau = 0.3,
nlambda=100, penalty.factor = rep(1, nvars),
lambda.min.ratio=ifelse(nobs<nvars,1e3,1e4),
standardize=TRUE,intercept=TRUE,dfmax=nvars+1,
pmax=min(dfmax*2+20,nvars), lower.limits=Inf,upper.limits=Inf,
standardize.response=FALSE, maxIter=100, Tol=1e4)

x 

y 
response variable. Quantitative for 
family 
Response type (see above) 
nfolds 
number of folds  default is 10. Although 
weights 
Observation weights; defaults to 1 per observation 
offset 
Offset vector (matrix) as in 
lambda 
Optional usersupplied lambda sequence; default is

tau 
Tuning parameter. 
nlambda 
The number of 
penalty.factor 
Separate penalty factors can be applied to each
coefficient. This is a number that multiplies 
lambda.min.ratio 
Smallest value for 
standardize 
Logical flag for x variable standardization, prior to
fitting the model sequence. The coefficients are always returned on
the original scale. Default is 
intercept 
Should intercept(s) be fitted (default=TRUE) or set to zero (FALSE) 
dfmax 
Limit the maximum number of variables in the
model. Useful for very large 
pmax 
Limit the maximum number of variables ever to be nonzero 
lower.limits 
Vector of lower limits for each coefficient;
default 
upper.limits 
Vector of upper limits for each coefficient;
default 
standardize.response 
This is for the 
maxIter 
Maximum iteration for TLP. 
Tol 
Tolerance. 
The function runs glmTLP
nfolds
+1 times; the
first to get the lambda
sequence, 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 that cv.glmnet
does NOT search for
values for tau
. A specific value should be supplied, else
tau= 0.3
is assumed by default.
an object of class "cv.glmnet"
is returned, which is a
list with the ingredients of the crossvalidation fit. Although the implementation is different, we try to mimic returning as "cv.glment"
in a popular package glmnet
such that users can use truncated lasso as using elastic net.
lambda 
the values of 
cvm 
The mean crossvalidated error  a vector of length

cvsd 
estimate of standard error of 
cvup 
upper curve = 
cvlo 
lower curve = 
nzero 
number of nonzero coefficients at each 
name 
a text string indicating type of measure (for plotting purposes). 
glmnet.fit 
a fitted glmnet object for the full data. 
lambda.min 
value of 
lambda.1se 
largest value of 
fit.preval 
if 
foldid 
if 
Chong Wu
Maintainer: Chong Wu <[email protected]>
Xiaotong Shen , Wei Pan and Yunzhang Zhu (2012) LikelihoodBased Selection and Sharp Parameter Estimation, Journal of the American Statistical Association, 107:497, 223232
1 2 3 4 5 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.