library.surviv
Submodule¶
Module Summary¶
Interfaces for the NAG Mark 30.2 surviv Chapter.
surviv
- Survival Analysis
This module is concerned with statistical techniques used in the analysis of survival/reliability/failure time data.
Other modules contain functions which are also used to analyse this type of data. Submodule correg
contains generalized linear models, submodule univar
contains functions to fit distribution models, and submodule nonpar
contains rank based methods.
See Also¶
naginterfaces.library.examples.surviv
:This subpackage contains examples for the
surviv
module. See also the Examples subsection.
Functionality Index¶
Cox’s proportional hazard model
create the risk sets:
coxmodel_risksets()
parameter estimates and other statistics:
coxmodel()
Survival
Rank statistics:
logrank()
Survivor function: kaplanmeier()
For full information please refer to the NAG Library document
https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/g12/g12intro.html
Examples¶
- naginterfaces.library.examples.surviv.coxmodel_ex.main()[source]¶
Example for
naginterfaces.library.surviv.coxmodel()
.Fits Cox’s proportional hazard model.
>>> main() naginterfaces.library.surviv.coxmodel Python Example Results. Parameter estimates, survival function for a group of leukaemia patients. Parameter Estimate Standard Error 1 -1.5091 0.4096 Deviance = 1.7276e+02 Time Survivor Function 1 0.9640 2 0.9264 3 0.9065 4 0.8661 5 0.8235 6 0.7566 7 0.7343 8 0.6506 10 0.6241 11 0.5724 12 0.5135 13 0.4784 15 0.4447 16 0.4078 17 0.3727 22 0.2859 23 0.1908