coxfunk | R Documentation |
Calculates minus the log likelihood function and its first and second order
derivatives for data from a Cox regression model. It is used by coxreg
if the argument coxph = FALSE
coxfunk(beta, X, offset, rs, what = 2)
beta |
Regression parameters |
X |
The design (covariate) matrix. |
offset |
Offset. |
rs |
Risk set created by |
what |
what = 0 means only loglihood, 1 means score vector as well, 2 loglihood, score and hessian. |
Note that the function returns log likelihood, score vector and minus hessian, i.e. the observed information. The model is
A list with components
loglik |
The log likelihood. |
dloglik |
The score vector. Nonzero if |
d2loglik |
The hessian. Nonzero if |
Göran Broström
coxreg
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.