I'm trying to do LASSO in R with the package glmpath. However, I'm not
sure
if I am using the accompanying prediction function *predict.glmpath()*
correctly.
Suppose I fit some regularized binomial regression model like so:
library(glmpath);load(heart.data);attach(heart.data);
fit <- glmpath(x, y, family=binomial)
Then I can use predict.glmpath() to estimate the value of the response
variable y at x for varying values of lambda through
pred <- predict.glmpath(fit, newx = x, mode="lambda",
s=seq(0,10,1),type="response")
However, in the help file it can be seen that there is also an option
*newy*. How should one interpret the result when calling
*predict.glmpath()* with *newy = some.y*?
Additionally, in the help file it can be seen that there exist
numerous choices for the option "type":
description in help file
"response" the estimated responses are
returned"loglik"
the log-likelihoods are returned"coefficients" the
coefficients are returned. The coefficients for the initial input
variables are returned (rather than the standardized
coefficients)"link"(default) the linear predictors are returned
How should I understand these options? To which linear predictors and
coefficients are they referring to? Surely not those of the original
model?
Thanks in advance!
[[alternative HTML version deleted]]