Weibull Regression Calculator – Free Online Survival Analysis Tool | AFT Model with Hazard Ratios & Shape Parameter

Weibull Regression Calculator – Free Online Survival Analysis Tool | AFT Model with Hazard Ratios & Shape Parameter
Stats Unlock · Survival Models

Weibull Regression Calculator

Free online parametric survival analysis tool — fit Weibull AFT models, estimate shape and scale parameters, hazard ratios, p-values, and APA-format results from your time-to-event data.

Survival Model Parametric AFT / PH Censored Data MLE Estimation
Survival
Hazard
Density
Q-Q Plot

📥 Data Input

Format: comma-separated values. Example placeholder shows: 52, 48, 55, 61, 47, … Each cluster/group enters its own row. The group name is editable.

📌 Click columns that should each become a cluster — selected columns will be loaded as separate clusters. Numeric columns only.

Click cells to edit values. Leave blank to skip. Use the buttons to add/remove rows.

⚙️ Model Configuration

📚 Technical Notes & Formulas

A. Formulas Used

Weibull Probability Density Function (PDF):
  f(t; k, λ) = (k/λ) · (t/λ)^(k-1) · exp[-(t/λ)^k]

Weibull Survival Function:
  S(t; k, λ) = exp[-(t/λ)^k]

Weibull Hazard Function:
  h(t; k, λ) = (k/λ) · (t/λ)^(k-1)

Weibull Cumulative Hazard:
  H(t; k, λ) = (t/λ)^k

Weibull AFT Model:
  log(T) = β₀ + β₁ X + σ ε,    where ε ~ extreme value distribution
  Equivalently:  T = λ · exp(βX) · W^(1/k),    W ~ Exp(1)

Weibull PH Model:
  h(t | X) = h₀(t) · exp(γX)
  Linkage to AFT:  γ = -k · β

Log-Likelihood (with right-censoring; δᵢ = 1 if event, 0 if censored):
  ℓ(k, λ) = Σ δᵢ [log k - k log λ + (k-1) log tᵢ] - Σ (tᵢ/λ)^k

Maximum-Likelihood Estimators (uncensored, simple Weibull):
  k̂  solves:   1/k̂ + (1/d) Σ log tᵢ - [Σ tᵢ^k̂ log tᵢ] / [Σ tᵢ^k̂] = 0
  λ̂ = ( (1/d) Σ tᵢ^k̂ )^(1/k̂)

Hazard Ratio (PH form):
  HR = exp(γ) = exp(-k̂ · β̂)

Standard Error & 95% CI:
  SE(β) = √[diag(I⁻¹(β))]   ;   95% CI:  β̂ ± 1.96 · SE(β̂)

Wald p-value:
  z = β̂ / SE(β̂)   ;   p = 2·[1 − Φ(|z|)]

Akaike Information Criterion:
  AIC = -2·ℓ + 2·p

Where:
  t        = observed time-to-event
  k        = Weibull shape parameter
  λ        = Weibull scale parameter
  T        = random survival time
  X        = covariate vector
  β        = AFT coefficient
  γ        = PH coefficient
  δᵢ       = event indicator
  d        = number of events
  σ = 1/k  = AFT scale
  ℓ        = log-likelihood
  p        = number of parameters
  Φ        = standard-normal CDF

B. Technical Notes

  • Estimation: Parameters are obtained by maximum-likelihood estimation. Iterative Newton-Raphson (or scoring) is used internally for shape k when no closed form exists.
  • Right censoring: Censored observations contribute the survival probability at their censoring time; only events contribute the density.
  • Link AFT ↔ PH: The Weibull is the only continuous distribution that admits both AFT and PH parameterisations simultaneously.
  • Exponential as a special case: When k = 1, Weibull reduces to the exponential model with constant hazard.
  • Compare models: Use AIC/BIC to compare against exponential, log-normal, log-logistic, and generalised gamma alternatives.
  • Goodness of fit: A near-linear log(-log S(t)) vs log(t) plot supports the Weibull assumption.
✅ When to Use Weibull Regression

This free Weibull regression calculator is designed for any researcher analysing time-to-event data — clinical trial endpoints, engineering reliability tests, customer-churn timing, equipment lifespan, or biological survival studies — when an absolute-time interpretation and a parametric distributional fit are both required.

Decision Checklist

  • The outcome is time-to-event (positive, continuous).
  • You may have right-censored observations (subjects who haven't yet had the event).
  • A monotonic hazard (constantly increasing or decreasing failure rate) is plausible.
  • You want both hazard ratios and absolute survival probabilities.
  • You want a model that supports AFT and PH interpretations.
  • Do NOT use if the hazard is non-monotonic (rises then falls) — consider log-normal or log-logistic instead.
  • Do NOT use for binary outcome at fixed follow-up — use logistic regression.
  • Do NOT use if the proportional-hazards assumption is rejected and AFT is also implausible — use Cox with time-varying covariates or stratified Cox.

Real-World Examples

Medical Research: Survival time (months) of cancer patients across treatment arms — fit a Weibull AFT to estimate the multiplicative effect of treatment on expected survival.
Engineering Reliability: Burn-out time of mechanical bearings under different load conditions — Weibull shape k>1 is consistent with wear-out failure.
Customer Analytics: Months until customer churn under different subscription tiers — hazard-ratio interpretation guides retention strategy.
Biology / Ecology: Time to recapture in mark-recapture surveys, treating recapture as the "event" and never-recaptured animals as right-censored.

Sample-Size Guidance

A common rule is 10 to 15 events per covariate. With one binary group covariate plus an intercept, aim for at least 20 to 30 events per group; for stable shape estimation, 50 to 100 events overall is preferable.

Decision Tree

Time-to-event outcome?
  └── No  → Logistic / Linear regression
  └── Yes → Censored data?
        └── No  → Weibull AFT (this tool) or linear log(T)
        └── Yes → Parametric assumption ok?
              ├── Yes, monotonic hazard → Weibull regression (this tool)
              ├── Yes, non-monotonic    → log-normal / log-logistic
              └── No                    → Cox proportional-hazards model
🧭 How to Use This Weibull Regression Calculator
  1. Enter your data. Use the Paste tab and the placeholder format — for example 52, 48, 55, 61, 47 — one cluster per row. Each cluster's name is editable.
  2. Or pick a sample dataset. Five built-in datasets cover medical, engineering, customer-churn, light-bulb, and treatment-recovery contexts.
  3. Configure the model. Pick α (default 0.05), the parameterisation (AFT vs PH), reference group, and a censoring rule.
  4. Click "Run Weibull Regression Analysis". All results stream in immediately.
  5. Read the summary cards. Shape k, scale λ, log-likelihood, AIC, and overall p-value tell you the headline picture.
  6. Read the coefficients table. Each group's β (AFT), HR (PH), 95% CI, and Wald p-value are listed with one row per group.
  7. Inspect the four plots. Survival curves, hazard curves, density curves, and the Q-Q diagnostic together verify the Weibull fit.
  8. Check assumptions. The badges flag the Weibull-shape diagnostic, censoring proportion, and sample-size rule of thumb.
  9. Read the interpretation. Five ready-made write-ups cover APA, dissertation, plain-language, abstract, and pre-registration formats.
  10. Export. Download a Doc, a PDF, or copy the summary line for your manuscript.
❓ Frequently Asked Questions
Q1. What is Weibull regression and when should I use it?
Weibull regression is a parametric survival model that assumes failure times follow a Weibull distribution. It is appropriate whenever you have time-to-event data — possibly censored — and want to estimate how covariates speed up or slow down the time to the event, while also obtaining absolute survival probabilities.
Q2. How is Weibull regression different from Cox proportional-hazards regression?
Cox is semi-parametric — the baseline hazard is left unspecified. Weibull is fully parametric: you assume a Weibull baseline hazard, which means you can produce absolute survival predictions and you gain efficiency when the assumption holds.
Q3. What does the Weibull shape parameter k mean in practice?
k controls the hazard's behaviour over time. k=1 → constant hazard (memoryless, exponential); k>1 → increasing hazard (wear-out, ageing); k<1 → decreasing hazard (early-life failure, infant mortality).
Q4. What is the Weibull AFT versus PH parameterisation?
AFT models multiply expected survival time by exp(β·X); PH models multiply the hazard by exp(γ·X). The two are linked by γ = −k·β, so one fit gives both interpretations.
Q5. How do I read a hazard ratio from this calculator?
The HR column shows exp(−k·β) for each group relative to the reference. HR>1 means the group has a higher hazard than the reference (shorter survival); HR<1 means a lower hazard (longer survival).
Q6. How does the calculator handle censored data?
The censoring dropdown applies right-censoring to the largest 5% or 10% of observations to demonstrate handling. In the log-likelihood, censored cases contribute S(t) only; events contribute the full Weibull density.
Q7. How do I check whether the Weibull assumption holds?
Inspect the Q-Q diagnostic plot: if log(−log S(t)) plotted against log(t) is approximately linear, the Weibull is reasonable. Compare AIC against alternative parametric models (log-normal, log-logistic, exponential).
Q8. What sample size do I need for stable estimates?
A useful rule is 10–15 events per covariate. With one group covariate, target 20–30 events per group and 50–100 events overall for reliable shape and scale estimates.
Q9. Is Weibull regression appropriate for "bath-tub" hazards that fall then rise?
No — a single Weibull only allows monotonic hazards. For bath-tub patterns use a generalised gamma, log-logistic with mixture, or piecewise/spline-based models.
Q10. Can I report Weibull regression results in APA 7 format?
Yes. The "How to Write Your Results" section auto-generates an APA-compliant paragraph that includes the shape parameter, hazard ratio, 95% CI, and p-value formatted to APA conventions (italicised stat symbols, p < .001 rule).
📚 References

The following references support the statistical methods used in this Weibull regression calculator, covering parametric survival regression, accelerated failure time modelling, and best practices in censored time-to-event analysis.

  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. (1972). Regression models and life-tables. Journal of the Royal Statistical Society: Series B, 34(2), 187–220. https://doi.org/10.1111/j.2517-6161.1972.tb00899.x
  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. Collett, D. (2015). Modelling survival data in medical research (3rd ed.). CRC Press. https://doi.org/10.1201/b18041
  6. 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
  7. Hosmer, D. W., Lemeshow, S., & May, S. (2008). Applied survival analysis: Regression modeling of time-to-event data (2nd ed.). Wiley. https://doi.org/10.1002/9780470258019
  8. Lawless, J. F. (2003). Statistical models and methods for lifetime data (2nd ed.). Wiley. https://doi.org/10.1002/9781118033005
  9. Aalen, O. O., Borgan, Ø., & Gjessing, H. K. (2008). Survival and event history analysis: A process point of view. Springer. https://doi.org/10.1007/978-0-387-68560-1
  10. Bender, R., Augustin, T., & Blettner, M. (2005). Generating survival times to simulate Cox proportional-hazards models. Statistics in Medicine, 24(11), 1713–1723. https://doi.org/10.1002/sim.2059
  11. Bradburn, M. J., Clark, T. G., Love, S. B., & Altman, D. G. (2003). Survival analysis. Part II: Multivariate data analysis – an introduction to concepts and methods. British Journal of Cancer, 89, 431–436. https://doi.org/10.1038/sj.bjc.6601119
  12. 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
  13. American Psychological Association. (2020). Publication manual of the American Psychological Association (7th ed.). APA. https://doi.org/10.1037/0000165-000
  14. R Core Team. (2024). R: A language and environment for statistical computing. R Foundation for Statistical Computing. https://www.R-project.org/
  15. NIST/SEMATECH. (2013). e-Handbook of statistical methods — Weibull distribution. National Institute of Standards and Technology. https://www.itl.nist.gov/div898/handbook/eda/section3/eda3668.htm

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.