yat
0.21pre
|
#include <yat/regression/MultiCox.h>
Public Member Functions | |
MultiCox (void) | |
Default Constructor. | |
MultiCox (const MultiCox &other) | |
Copy Constructor. More... | |
MultiCox (MultiCox &&other) | |
~MultiCox (void) | |
MultiCox & | operator= (const MultiCox &other) |
MultiCox & | operator= (MultiCox &&other) |
void | add (const utility::VectorBase &x, double time, bool event) |
add a sample More... | |
void | add (const utility::MatrixBase &x, const utility::VectorBase &time, const std::vector< char > &event) |
Add n data points. More... | |
void | clear (void) |
void | train (void) |
double | b (size_t i) const |
double | z (size_t i) const |
double | p (size_t i) const |
two-sided p-value for the null-hypothesis that is zero. | |
double | hazard_ratio (size_t i) const |
double | hazard_ratio_lower_CI (size_t, double alpha=0.95) const |
double | hazard_ratio_upper_CI (size_t, double alpha=0.95) const |
const utility::MatrixBase & | covariance (void) const |
Class handling multivariable Cox regression.
The time-dependent hazard is modeled as
Model parameters are inferred as described by Breslow (1975) and tied timepoints are handled as suggested by Efron (1975).
theplu::yat::regression::MultiCox::MultiCox | ( | const MultiCox & | other | ) |
Copy Constructor.
Create a copy of other
and its data
theplu::yat::regression::MultiCox::MultiCox | ( | MultiCox && | other | ) |
Move constructor
theplu::yat::regression::MultiCox::~MultiCox | ( | void | ) |
Destructor
void theplu::yat::regression::MultiCox::add | ( | const utility::VectorBase & | x, |
double | time, | ||
bool | event | ||
) |
add a sample
x | value covariate vector for sample |
time | timepoint when event occured for sample or sample was censored |
event | true if sample was not censored |
void theplu::yat::regression::MultiCox::add | ( | const utility::MatrixBase & | x, |
const utility::VectorBase & | time, | ||
const std::vector< char > & | event | ||
) |
Add n data points.
Each column in X corresponds to a data point. Equivalent to looping over the columns and vectors and calling single-sample version of add.
double theplu::yat::regression::MultiCox::b | ( | size_t | i | ) | const |
return ith element of the b-vector
void theplu::yat::regression::MultiCox::clear | ( | void | ) |
Remove all data
const utility::MatrixBase& theplu::yat::regression::MultiCox::covariance | ( | void | ) | const |
double theplu::yat::regression::MultiCox::hazard_ratio | ( | size_t | i | ) | const |
The hazard ratio associated with the ith variable.
double theplu::yat::regression::MultiCox::hazard_ratio_lower_CI | ( | size_t | , |
double | alpha = 0.95 |
||
) | const |
Lower bound of confidence interval
double theplu::yat::regression::MultiCox::hazard_ratio_upper_CI | ( | size_t | , |
double | alpha = 0.95 |
||
) | const |
Upper bound of confidence interval
Assignment operator
void theplu::yat::regression::MultiCox::train | ( | void | ) |
Find the parameters of the model
double theplu::yat::regression::MultiCox::z | ( | size_t | i | ) | const |