ncvreg
. This function performs no checking, processing or
standardization, so use ncvreg
instead, unless you really know
what you're doing.ncvreg_fit(X, y, family=c("gaussian", "binomial", "poisson"),
penalty=c("MCP", "SCAD", "lasso"), gamma=3, alpha=1,
lambda.min=ifelse(n>p,0.001,0.05), nlambda=100, lambda, eps=.001,
max.iter=1000, dfmax=p+1, penalty.factor=rep(1, ncol(X)), warn=TRUE)
ncvreg
,
ncvreg_fit
does not standardize the data. For Gaussian
responses, no intercept is included. At least for now, an intercept
is still included ancvreg
.ncvreg
.ncvreg
.ncvreg
.ncvreg
.ncvreg
.ncvreg
.ncvreg
.lambda
."gaussian"
) or negative log-likelihood ("binomial"
or
"poisson"
) of the fitted model at each value of
lambda
.nlambda
containing the number
of iterations until convergence at each value of lambda
.ncvreg_fit
is supplied as a separate function in case
developers wish to embed ncvreg's internal algorithms in a larger
procedure. It should not be called directly unless you know exactly
what you are doing. In particular, no standardization or processing
of X
and y
are carried out, and the output will not work
with any of other functions in the package such as
plot.ncvreg
or predict.ncvreg
.ncvreg
data(prostate)
X <- as.matrix(prostate[,1:8])
y <- prostate$lpsa
## These two results are NOT the same;
## No standardization is being done in the latter
ncvreg(X, y, lambda=c(0.5, 0.1, 0.05))$beta
ncvreg_fit(X, y, lambda=c(0.5, 0.1, 0.05))$beta
Run the code above in your browser using DataLab