Description Usage Arguments Value Note See Also Examples
Obtains predictions from a grplasso
object.
1 2 3 |
object |
a |
newdata |
|
type |
the type of prediction. |
na.action |
function determining what should be done with missing values
in |
... |
other options to be passed to the predict function. |
A matrix whose columns correspond to the different values of
the penalty parameter lambda
of the grplasso
object.
If newdata
is given, offsets specified by offset
in the
fit by grplasso.default
will not be included in predictions,
whereas those specified by an offset term in the formula will be considered.
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(splice)
contr <- rep(list("contr.sum"), ncol(splice) - 1)
names(contr) <- names(splice)[-1]
fit <- grplasso(y ~ ., data = splice, model = LogReg(), lambda = 10,
contrasts = contr, standardize = TRUE)
pred <- predict(fit)
pred.resp <- predict(fit, type = "response")
## The following points should lie on the sigmoid curve
plot(pred, pred.resp)
|
Lambda: 10 nr.var: 22
There were 50 or more warnings (use warnings() to see the first 50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.