coef.cornet | R Documentation |

Extracts estimated coefficients from linear and logistic regression, under the penalty parameter that minimises the cross-validated loss.

## S3 method for class 'cornet' coef(object, ...)

`object` |
cornet object |

`...` |
further arguments (not applicable) |

This function returns a matrix with *n* rows and two columns,
where *n* is the sample size. It includes the estimated coefficients
from linear regression (1st column: `"beta"`

)
and logistic regression (2nd column: `"gamma"`

).

n <- 100; p <- 200 y <- rnorm(n) X <- matrix(rnorm(n*p),nrow=n,ncol=p) net <- cornet(y=y,cutoff=0,X=X) coef(net)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.