1 #ifndef HAZARDFUNCTIONEXP_H
3 #define HAZARDFUNCTIONEXP_H
26 void setAB(
double A,
double B) { m_A = A; m_B = B; }
33 return std::exp(m_A + m_B * t);
39 return dt*std::exp(m_A);
41 return (std::exp(m_A + m_B*t0)/m_B)*(std::exp(m_B * dt) - 1.0);
47 return Tdiff/std::exp(m_A);
49 return (1.0/m_B)*std::log((m_B*Tdiff)/std::exp(m_A + m_B*t0) + 1.0);
52 #endif // HAZARDFUNCTIONEXP_H
Abstract base class which can be used for a hazard.
Definition: hazardfunction.h:18
double solveForRealTimeInterval(double t0, double Tdiff)
For the specified internal time interval Tdiff, calculate the corresponding real-world time interval...
Definition: hazardfunctionexp.h:44
HazardFunctionExp(double A=0, double B=0)
Constructor which specifies the parameters in exp(A+Bt).
Definition: hazardfunctionexp.h:19
double evaluate(double t)
Evaluate the hazard at time t.
Definition: hazardfunctionexp.h:31
double calculateInternalTimeInterval(double t0, double dt)
Map the real-world time dt to an internal time interval.
Definition: hazardfunctionexp.h:36
Helper class for time dependent exponential hazards.
Definition: hazardfunctionexp.h:15