# coxnet.deviance

From glmnet v3.0-2
by Trevor Hastie

##### compute deviance for cox model output

Given a fit or coefficients, compute the deciance (-2 log partial likelihood) for right-censored survival data

##### Usage

```
coxnet.deviance(pred = NULL, y, x = 0, offset = NULL,
weights = NULL, beta = NULL)
```

##### Arguments

- pred
matrix of predictions

- y
a survival response matrix, as produced by

`Surv`

- x
optional

`x`

matrix, if`pred`

is`NULL`

- offset
optional offset

- weights
optional observation weights

- beta
optional coefficient vector/matrix, supplied if

`pred=NULL`

##### Details

`coxnet.deviance`

computes the deviance for a single prediction, or a matrix of predictions

##### Value

a single or vector of deviances

##### See Also

`coxgrad`

*Documentation reproduced from package glmnet, version 3.0-2, License: GPL-2*

### Community examples

Looks like there are no examples yet.