Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

use.cox.path

Check if glmnet should call cox.path


Description

Helper function to check if glmnet() should call cox.path().

Usage

use.cox.path(x, y)

Arguments

x

Design matrix.

y

Response variable.

Details

For family="cox", we only call the original coxnet() function if (i) x is not sparse, (ii) y is right-censored data, and (iii) we are not fitting a stratified Cox model. This function also throws an error if y has a "strata" attribute but is not of type "stratifySurv".

Value

TRUE if cox.path() should be called, FALSE otherwise.


glmnet

Lasso and Elastic-Net Regularized Generalized Linear Models

v4.1-1
GPL-2
Authors
Jerome Friedman [aut], Trevor Hastie [aut, cre], Rob Tibshirani [aut], Balasubramanian Narasimhan [aut], Kenneth Tay [aut], Noah Simon [aut], Junyang Qian [ctb]
Initial release
2021-02-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.