Calculator Inputs
Formula Used
This calculator combines a baseline survival model with a time-varying covariate. It then estimates cumulative hazard numerically and converts that result into survival and event probability.
Because time-varying hazard models can become difficult to integrate analytically, this page uses trapezoidal integration over many small steps. Increasing the step count usually improves approximation quality.
How to Use This Calculator
- Select a baseline hazard family that matches your survival assumption.
- Enter the time interval you want to study.
- Set the baseline parameters for that chosen family.
- Enter beta, the starting covariate value, and its change pattern.
- Adjust the hazard multiplier if you want a global scaling factor.
- Choose enough integration steps for a stable estimate.
- Click the calculate button to generate results, tables, and curves.
- Download the output as CSV or PDF if needed.
Example Data Table
Sample illustration for a rising-risk scenario with a positive covariate effect.
| Time | x(t) | Baseline Hazard | Total Hazard | Cumulative Hazard | Survival |
|---|---|---|---|---|---|
| 0.00 | 1.0000 | 0.0732 | 0.1148 | 0.0000 | 1.0000 |
| 2.00 | 1.3600 | 0.1005 | 0.1856 | 0.3029 | 0.7386 |
| 4.00 | 1.7200 | 0.1248 | 0.2710 | 0.7588 | 0.4682 |
| 6.00 | 2.0800 | 0.1474 | 0.3757 | 1.3989 | 0.2469 |
| 8.00 | 2.4400 | 0.1688 | 0.5050 | 2.2576 | 0.1046 |
Frequently Asked Questions
1. What is a time-varying hazard?
It is a hazard rate that changes with time. The change can come from the baseline model, a covariate that evolves over time, or both together.
2. Why use a time-varying covariate?
Some risk factors are not constant. Dose, exposure, workload, treatment response, or biomarker levels may shift, so a fixed-covariate model can miss important hazard changes.
3. When should I choose Weibull?
Use Weibull when you expect monotonic hazard change. A shape above one suggests increasing hazard, while a shape below one suggests decreasing hazard.
4. When is Gompertz useful?
Gompertz is useful when hazard grows or shrinks exponentially with time. It is common in aging, reliability, and some actuarial applications.
5. What does beta do here?
Beta measures how strongly the covariate affects hazard. A positive beta raises hazard as the covariate increases, while a negative beta lowers it.
6. Why does the calculator use numerical integration?
With changing covariates, cumulative hazard often has no simple closed form. Numerical integration gives a practical estimate for survival and interval probabilities.
7. What does interval event probability mean?
It is the estimated probability that the event occurs within the selected time window, based on the calculated cumulative hazard across that interval.
8. How many integration steps should I use?
Use more steps when hazard changes sharply or the interval is long. For many practical cases, 100 to 300 steps provides a stable curve.