Weibull Regression Calculator – Survival Analysis & AFT Model Online

Weibull Regression Calculator – Survival Analysis & AFT Model Online
📋

Input Data

Enter survival/failure times (comma-separated) and corresponding event/censoring status (1 = event occurred, 0 = censored). Add one optional predictor column (covariate/treatment group).

20 values
20 values
20 values
20 values
Headers detected automatically. Click columns to assign them as Time, Event-status, and Group.

Enter data row by row. Use 1 for event observed, 0 for censored. Group: 1 = exposed, 0 = control.

# Time Event (1/0) Group (1/0)
📊

Key Statistics

Shape (k)
Hazard direction over time
Scale (λ)
Characteristic life
β Coefficient
Log-time ratio (AFT)
Time Ratio (TR)
exp(β) = survival multiplier
p-value
Wald test for β
AIC
Model fit criterion
ParameterEstimateStd Errorz-statisticp-value95% CI Lower95% CI Upper
📋

Group Summary Statistics

⏱️

Survival Probability at Key Time Points

Estimated probability of surviving beyond each time point — from the fitted Weibull model. S(t) = exp[−(t/λ)k].

📐

Percentile Survival Times

Time by which a given percentage of subjects have experienced the event. Derived by inverting the survival function: tp = λ · [−ln(1−p)]1/k.

Cumulative Hazard H(t)

H(t) = (t/λ)k. Total accumulated risk up to time t. A straight line on log-log confirms Weibull fit.

🎯

Effect Size & Significance

🔬

Model Fit & Comparison

Full model (with group predictor) vs null model (intercept + shape only). Lower AIC/BIC = better fit. ΔAIC > 2 is meaningful.

ModelParametersLog-LikAICBICΔAIC vs NullLR p-value
📈

Visualizations

① Survival Function S(t)
② Hazard Function h(t)
③ Probability Density f(t)
④ Weibull Probability Plot (log–log)
🔍

Detailed Interpretation of Results

📌 What Your Results Mean

Run the analysis to see interpretation.

📋 Assumption Checks

✍️

How to Write Your Results in Research

Five ready-to-use write-up templates. Click 📋 Copy to copy directly to your clipboard.

Run the analysis above to generate write-up templates with your actual values.

🏁

Conclusion

Summary of Findings

Run the analysis to see a detailed conclusion.

📖

How to Use This Calculator

1

Prepare Your Data

Collect time-to-event data and event status (1 = event occurred, 0 = censored). Each row represents one subject. Example: time=52, status=1 means the event occurred at time 52.

2

Choose Your Input Method

Type/paste comma-separated times and statuses, upload a CSV/Excel file, or use the manual grid. Sample datasets are available for quick exploration.

3

Name Your Groups

Edit the group name fields (e.g., "Treatment vs Control", "High Temperature vs Low Temperature"). These names appear in all results and write-up templates.

4

Set Significance Level

Choose α = 0.05 (standard), 0.01 (strict), or 0.10 (exploratory). This controls the threshold for statistical significance of the group effect (β coefficient).

5

Click Run Analysis

The tool fits a Weibull AFT model, estimating the shape (k), scale (λ), and regression coefficient (β) via maximum likelihood. Do NOT click before entering data.

6

Read the Shape Parameter

k < 1 = decreasing hazard (early failures). k = 1 = constant hazard (exponential). k > 1 = increasing hazard (aging/wear). The shape parameter is one of the most biologically meaningful outputs.

7

Interpret the Time Ratio

exp(β) is the time ratio (TR). TR = 1.5 means Group A survives 50% longer than Group B. TR = 0.7 means Group A experiences the event 30% sooner. TR > 1 is protective; TR < 1 is harmful.

8

Review the Four Charts

The survival function shows the probability of surviving beyond time t. The hazard function shows instantaneous risk. The PDF shows event timing. The Weibull probability plot confirms whether the Weibull assumption holds (look for a straight line).

9

Check Assumptions

Review the assumption checklist. Key assumptions: (1) Weibull distribution fits the data. (2) Hazard ratio is proportional between groups (if using PH interpretation). (3) Censoring is non-informative (random). (4) Observations are independent.

10

Copy Your Write-Up

Use the five write-up templates (APA 7th, Thesis, Plain Language, Abstract, Pre-Registration) with all values auto-filled. Click Copy and paste directly into your manuscript or report.

📌 When to Use Weibull Regression

Use Weibull regression when you have time-to-event (survival) data with right-censoring and you want a fully parametric model that assumes the Weibull distribution.

✅ Use Weibull Regression When:

• Time-to-event data with censored observations
• You need to extrapolate beyond observation period
• The shape parameter k has scientific meaning
• You want to compare AIC/BIC across distributions
• You need smooth survival curve estimates
• Baseline hazard shape matters to your research

❌ Do NOT Use When:

• The Weibull probability plot is strongly curved
• You cannot assume a parametric distribution
• Outcomes are binary (use logistic regression)
• Data is continuous, non-time-based (use OLS)
• No censoring and non-survival outcome
• Very small samples (< 20 events)

🔬 Common Research Examples:

• Clinical trials: time to disease relapse
• Ecology: nest survival, migration timing
• Engineering: machine component failure
• Business: customer churn duration
• Veterinary science: animal lifespan
• Environmental science: pollutant degradation

⚖️ Weibull vs Cox Regression:

• Weibull: parametric, assumes Weibull distribution, better for extrapolation and prediction
• Cox: semi-parametric, no distributional assumption, more flexible
• Use Weibull when: distribution assumption holds, shape parameter is meaningful
• Use Cox when: distribution is unknown or uncertain

🔢 Technical Notes — Formulas Used

The Weibull Regression (AFT parameterization) uses the following formulas. Each is computed sequentially during maximum likelihood estimation.

Weibull Probability Density Function (PDF)
f(t) = (k/λ)(t/λ)k−1 · exp[−(t/λ)k]
tSurvival time — the observed time to event or censoring
kShape parameter — controls the hazard direction (k < 1: decreasing, k = 1: constant, k > 1: increasing)
λScale parameter — characteristic life; time by which ~63.2% of subjects have experienced the event
Weibull Survival Function
S(t) = exp[−(t/λ)k]
S(t)Probability of surviving beyond time t (no event by time t)
(t/λ)kCumulative hazard at time t — monotonically increasing with t
RuleS(0)=1 always; S(λ) ≈ 0.368 for any k; S(∞)=0
Weibull Hazard Function
h(t) = (k/λ)(t/λ)k−1
h(t)Instantaneous rate of event occurrence at time t, given survival to t
k < 1h(t) decreases — infant mortality or early failure pattern
k = 1h(t) is constant — exponential distribution (memoryless)
k > 1h(t) increases — aging, wear-out, or cumulative damage
AFT Linear Predictor — Scale with Covariate
log(λi) = μ + β · xi
μIntercept — log-scale for the reference group (x = 0)
βRegression coefficient — log-change in survival time per unit increase in x
xiPredictor value for subject i (0 = control group, 1 = exposed group)
Time Ratio (AFT Effect Size)
TR = exp(β)
TRMultiplicative change in median survival time for a one-unit increase in x
TR > 1Predictor is protective — survival time is longer in exposed group
TR < 1Predictor is harmful — survival time is shorter in exposed group
95% CIexp(β ± 1.96 × SE(β)) — if CI excludes 1.0, the effect is significant
Log-Likelihood Function (MLE)
ℓ(θ) = Σ di log[f(ti)] + (1−di) log[S(ti)]
diEvent indicator: 1 if event observed, 0 if censored
f(ti)Weibull PDF at observed time — contribution from uncensored observations
S(ti)Survival function at censoring time — contribution from censored observations
θParameter vector (k, λ, β) — maximised to obtain MLEs
AIC and BIC — Model Fit Criteria
AIC = −2ℓ + 2p    BIC = −2ℓ + p·log(n)
Maximised log-likelihood — higher (less negative) is better
pNumber of estimated parameters (k, μ, β = 3 for one covariate)
nTotal sample size — BIC penalises model complexity more with larger n
RuleLower AIC/BIC indicates better fit; ΔAIC > 2 is meaningful
Wald z-statistic and 95% Confidence Interval
z = β̂ / SE(β̂)    CI = β̂ ± 1.96 × SE
β̂MLE of the regression coefficient
SE(β̂)Standard error from the observed Fisher information matrix
|z| > 1.96Significant at α = 0.05 (two-tailed Wald test)

Frequently Asked Questions

What is Weibull regression?
Weibull regression is a parametric survival analysis method that models time-to-event data. It assumes survival times follow a Weibull distribution and estimates a shape parameter (k) and scale parameter (λ). A regression coefficient (β) captures the effect of a predictor on survival time. The model can be expressed as an Accelerated Failure Time (AFT) model, where predictors directly accelerate or decelerate the time scale.
What is the difference between Weibull regression and Cox regression?
Cox regression is semi-parametric and does not assume a specific distribution for survival times, making it more flexible. Weibull regression is fully parametric — it assumes survival times follow a Weibull distribution. This assumption makes Weibull regression more efficient and allows extrapolation beyond the observation period. Cox regression is preferred when the distributional form is unknown; Weibull is preferred when the assumption can be verified and the shape parameter has scientific meaning.
What does the shape parameter k tell me?
The shape parameter k (also written as α or p) determines how the hazard rate changes over time. When k < 1, hazard decreases — this is called the "infant mortality" or "early failure" pattern and is common in quality defects or ecological stress responses. When k = 1, hazard is constant (the exponential distribution). When k > 1, hazard increases — indicating aging, accumulating damage, or wear-out failure. Biologically, k > 1 in aging studies means subjects become more vulnerable as they get older.
How do I interpret the time ratio (TR = exp(β))?
The time ratio is the most direct effect size in an AFT model. TR = exp(β) tells you how many times longer (or shorter) survival time is in the exposed group compared to the reference group. TR = 1.5 means the exposed group survives 50% longer. TR = 0.7 means the exposed group experiences the event 30% sooner (30% shorter survival). TR = 1.0 means no difference. If the 95% confidence interval for TR excludes 1.0, the effect is statistically significant.
What is censoring and how does it affect Weibull regression?
Censoring occurs when the event has not been observed by the end of the study period (right-censoring) or the subject dropped out. Censored observations contribute partial information — we know the event had not occurred by the censoring time, even if we don't know when it will occur. Weibull regression handles censoring correctly through the likelihood function, which uses the survival function S(t) for censored observations and the PDF f(t) for observed events. This ensures unbiased parameter estimates even with substantial censoring.
How do I check if the Weibull distribution is appropriate?
The Weibull probability plot is the primary visual check — plot log(−log(S(t))) versus log(t). If the points fall on a roughly straight line, the Weibull distribution is appropriate. The slope of the line estimates the shape parameter k. Non-linearity suggests a different distribution (log-normal, log-logistic, gamma). You can also compare AIC/BIC across different parametric distributions (exponential, log-normal, log-logistic) to select the best-fitting model.
Can I use Weibull regression with multiple predictors?
Yes. Multiple Weibull regression extends the AFT model to include two or more covariates: log(λᵢ) = μ + β₁x₁ + β₂x₂ + … Each βⱼ coefficient represents the effect of predictor j on log-survival time, holding all other predictors constant. You can include continuous predictors (age, dose, temperature), categorical predictors (treatment group, sex), and interaction terms. This calculator handles a single binary predictor (group comparison); for multiple regression, use R's survreg() function with the Weibull distribution.
What is AIC and how do I use it to compare models?
AIC (Akaike Information Criterion) = −2ℓ + 2p, where ℓ is the maximised log-likelihood and p is the number of parameters. Lower AIC indicates better model fit, penalised for complexity. To compare models, fit the same data with different distributions (Weibull, exponential, log-normal) and choose the one with the lowest AIC. A ΔAIC > 2 is typically considered a meaningful difference. BIC applies a stronger penalty for model complexity and is preferred for large samples.
How do I report Weibull regression results in APA format?
Report: shape parameter (k), scale parameter (λ), coefficient (β) with SE, Wald z-statistic, p-value, time ratio (TR) with 95% CI, and sample size with event count. Example: "A Weibull AFT regression model revealed that group membership significantly predicted time to event (β = 0.34, SE = 0.12, z = 2.83, p = .005; TR = 1.40, 95% CI [1.11, 1.77]). The shape parameter k = 1.85 indicated increasing hazard over time (n = 40, events = 34, AIC = 214.3)."
What is the scale parameter λ and what does it mean practically?
The scale parameter λ (lambda) is also called the "characteristic life" or "characteristic time." It is the time at which approximately 63.2% of subjects have experienced the event, regardless of the shape parameter k. Larger λ indicates longer survival or greater reliability. In an AFT model, the predictor shifts λ multiplicatively: λ for the exposed group = λ₀ × exp(β), where λ₀ is the scale for the reference group. It is the primary measure of location (central tendency) for the Weibull survival distribution.
How many observations do I need for Weibull regression?
A common rule of thumb is at least 10 events per parameter estimated (EPP rule). For a simple two-group Weibull regression (3 parameters: k, μ, β), you need at least 30 events. With high censoring rates (> 40%), larger samples are needed. Very small event counts (< 15) can produce unstable parameter estimates and unreliable confidence intervals. For reliable AIC model comparison, at least 50 events per distribution being compared is recommended.
What is the difference between the AFT and PH parameterizations of the Weibull model?
Both are valid representations of the same Weibull model — they are mathematically equivalent for the Weibull distribution (the only distribution that is simultaneously a PH and AFT model). In the AFT parameterization: exp(β) = time ratio — directly multiplies survival time. In the PH parameterization: exp(−β/σ) = hazard ratio — multiplies the hazard rate. This dual nature makes the Weibull model particularly interpretable. This calculator uses the AFT parameterization as it is most commonly used in biological and medical research.
📚

References

This Weibull regression calculator is based on parametric survival analysis and accelerated failure time (AFT) modelling methodology established in peer-reviewed literature. Key references for Weibull regression, survival analysis, and AFT models are listed below.

  1. Weibull, W. (1951). A statistical distribution function of wide applicability. Journal of Applied Mechanics, 18(3), 293–297. https://doi.org/10.1115/1.4010337
  2. Cox, D. R., & Oakes, D. (1984). Analysis of survival data. Chapman and Hall. https://doi.org/10.1201/9781315137438
  3. Kalbfleisch, J. D., & Prentice, R. L. (2002). The statistical analysis of failure time data (2nd ed.). Wiley. https://doi.org/10.1002/9781118032985
  4. Klein, J. P., & Moeschberger, M. L. (2003). Survival analysis: Techniques for censored and truncated data (2nd ed.). Springer. https://doi.org/10.1007/b97377
  5. Lawless, J. F. (2003). Statistical models and methods for lifetime data (2nd ed.). Wiley. https://doi.org/10.1002/9781118033005
  6. Collett, D. (2015). Modelling survival data in medical research (3rd ed.). CRC Press. https://doi.org/10.1201/b18041
  7. Royston, P., & Parmar, M. K. B. (2002). Flexible parametric proportional-hazards and proportional-odds models for censored survival data. Statistics in Medicine, 21(15), 2175–2197. https://doi.org/10.1002/sim.1203
  8. Akaike, H. (1974). A new look at the statistical model identification. IEEE Transactions on Automatic Control, 19(6), 716–723. https://doi.org/10.1109/TAC.1974.1100705
  9. Burnham, K. P., & Anderson, D. R. (2002). Model selection and multimodel inference: A practical information-theoretic approach (2nd ed.). Springer. https://doi.org/10.1007/b97636
  10. Therneau, T. M., & Grambsch, P. M. (2000). Modeling survival data: Extending the Cox model. Springer. https://doi.org/10.1007/978-1-4757-3294-8
  11. Hosmer, D. W., & Lemeshow, S. (1999). Applied survival analysis: Regression modeling of time to event data. Wiley. https://doi.org/10.1002/9781118884997
  12. Meeker, W. Q., & Escobar, L. A. (1998). Statistical methods for reliability data. Wiley. https://doi.org/10.1002/9780470316696
  13. Venables, W. N., & Ripley, B. D. (2002). Modern applied statistics with S (4th ed.). Springer. https://doi.org/10.1007/978-0-387-21706-2
  14. R Core Team. (2024). R: A language and environment for statistical computing. R Foundation for Statistical Computing. https://www.R-project.org/
  15. Harrell, F. E. (2015). Regression modeling strategies: With applications to linear models, logistic and ordinal regression, and survival analysis (2nd ed.). Springer. https://doi.org/10.1007/978-3-319-19425-7

Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post
Next Post

© 2026 STATS UNLOCK . statsunlock.com –  All Rights Reserved.