EconStatsCraft rigorous, plain-spoken econometrics
Econometrics that explains itself.
Regression, panel data, time series and the whole battery of tests. Every result is followed by a verdict you can defend.
Load a dataset to see it here.
EconStatsCraft › Life table
Builds a full single-decrement life table from a mortality law - Gompertz, Makeham or a constant force - and reports l_x, d_x, q_x, curtate and complete life expectancy, the median and modal age at death, and the survival and death-density curves.
A life table follows a notional cohort - conventionally 100,000 newborns - and records how many are still alive at each age. Everything else in life contingencies is arithmetic on that one column. The mortality rate qx is the probability of dying within the year given you reached age x, and it is a CONDITIONAL probability, which is why it can rise towards one while the number of deaths at that age falls to almost nothing.
Any life-contingent calculation starts here: annuity and assurance values, reserves, pension liabilities, or simply answering how long a cohort at a given age is expected to live.
From the survival function S(x)=P(T>x): the one-year mortality rate is q_x=[S(x)-S(x+1)]/S(x), and p_x=1-q_x. The cohort recursion is \ell_{x+1}=\ell_x p_x with deaths d_x=\ell_x-\ell_{x+1}. Person-years lived are L_x=\int_0^1 \ell_{x+t}\,dt\approx\tfrac12(\ell_x+\ell_{x+1}) under a uniform distribution of deaths, total future person-years are T_x=\sum_{k\ge x}L_k, and life expectancy is simply e_x=T_x/\ell_x. The central death rate m_x=d_x/L_x is the quantity actually observed in population data, and q_x\approx m_x/(1+\tfrac12 m_x) converts between them.
{}_{}p_x = e^{-\int_0^1 \mu(x+s)\,ds},\qquad \mu(x)=A + B c^{x}\ \text{(Makeham)},\qquad e_x = \sum_{k\ge 1} {}_{k}p_x
A Makeham table (A = 0.0002, B = 3.5e-05, c = 1.10) on a radix of 100,000 closing at age 121 gives complete e₀ = 76.36 years and e₆₅ = 16.42. So a 65-year-old is expected to reach 81.42 - five years past the figure quoted at birth. That is not a contradiction: e₀ averages in everyone who dies young, and having survived to 65 you have escaped all of them. Note also that the median age at death is 79 and the modal adult age at death is 82, both above e₀: the distribution of age at death is left-skewed, so the mean is the lowest of the three summaries and the one least like a typical life. For an annuity provider only e₆₅ matters, and pricing a pension off e₀ would understate the liability by years of payments per policy.
| If you see this | It means | Do this |
|---|---|---|
| qx above 1 | A rate has been used as a probability | Convert with qx = mx/(1 + mx/2) |
| log qx not close to linear in adulthood | Data error, or a genuine shock such as an epidemic | Plot it before doing anything else |
| Life expectancy rising with age | Correct and often surprising | Having survived to 65, you are expected to pass the e0 figure |
| A jagged qx at old ages | Very few exposed lives | Graduate the rates before using them |
| Annuity priced from a period table looks cheap | Longevity improvement ignored | Use a projected cohort basis |
| Table stops at 100 with survivors remaining | Truncation | Close the table with a limiting age or an exponential tail |
Life annuity and life insurance values, which are both expectations taken over this table. Graduation, for smoothing crude rates before use.
Life annuity · Life insurance pricing · Chain ladder reserving · Buhlmann credibility · Survival analysis · Mortality graduation · Aggregate loss model · Ruin probability · Multi-state Markov model · Loss severity fitting
Line chart · Area chart · Bar chart · Stacked bar · Scatter plot · Bubble chart · Histogram · Box plot · Pie chart · Heat map · Rebased to 100 · Lorenz curve and Gini
World map · Bivariate map · Flow map · India - state map · India - district map
Descriptive statistics · Summary by group · Two-way table · Classical statistical tests
Multiple regression (OLS) · Logit / Probit · Tobit (censored) · Truncated regression · Multinomial logit · Ordered logit / probit · Quantile regression · Poisson / Negative binomial
Time-varying coefficients (Kalman) · Unit root tests · Correlogram (ACF / PACF) · ARIMA / SARIMA · Rolling-origin cross-validation · Theta method · Unobserved components · STL forecasting · Forecast combination · Markov regime switching · Change frequency (resample) · ARCH / GARCH volatility · Decompose & filter · Spectral analysis · Exponential smoothing · Forecast accuracy
Yield curve (Nelson–Siegel / Svensson) · Dynamic factor model · Dynamic regression (ARIMAX) · Structural VAR · VAR · Granger causality · Cointegration · VECM · ARDL & bounds test
Panel regression · Panel cointegration tests · Heterogeneous panel: Mean Group & PMG · Gravity model of trade · Dynamic panel GMM · Panel diagnostics · Panel unit-root tests
Principal components (PCA) · Factor analysis · Cluster analysis
Conjoint analysis · MaxDiff (best–worst scaling) · TURF - reach of a product line · Price sensitivity (Van Westendorp) · Market basket analysis · Perceptual map · Scale reliability (Cronbach’s alpha) · Key driver analysis
Spatial autocorrelation · Spatial regression · Heckman selection · Instrumental variables (2SLS) · Difference-in-differences · Staggered difference-in-differences · Regression discontinuity · Matching & weighting · Oaxaca–Blinder decomposition
Black–Scholes option pricing · Bond price, duration & convexity · Merton distance to default · EMI / home loan planner · CAPM / beta estimation · Multi-factor model · Portfolio optimization · Value at Risk & Expected Shortfall · Performance & drawdown · Time value of money & NPV/IRR · Equity valuation (DDM, FCF, residual income) · Cost of capital (WACC) · Binomial option pricing · Option strategies (payoff & profit) · Forwards, futures & swaps · Credit risk & Basel capital · Extreme value theory (tail risk)
Life table · Life annuity · Life insurance pricing · Chain ladder reserving · Buhlmann credibility · Survival analysis · Mortality graduation · Aggregate loss model · Ruin probability · Multi-state Markov model · Loss severity fitting
Monte Carlo experiment · F-test, Wald & Chow · Structural breaks & stability
Regression vs machine learning · Ridge / Lasso / Elastic Net · Random forest · Gradient boosting
EconStatsCraft rigorous, plain-spoken econometrics
Regression, panel data, time series and the whole battery of tests. Every result is followed by a verdict you can defend.
Load a dataset to see it here.
Pick the example closest to your question. You get a spreadsheet with the right columns and a few rows showing the expected format - replace the numbers with your own, then paste or upload it back.
Copy the header row from the table above (or from the downloaded template), put your own rows underneath, and paste the whole thing here. It is checked against the layout before anything is imported.
Or click a row in the preview below.
For a units or notes row.
Search every source at once. World Bank indicators need countries and years; everything else loads in one click.
Loading the catalogue…
The engine stays loaded, so this is quick - and it leaves your open tab and panel layout alone.
⌘/Ctrl+Enter runs the current analysis. ⌘/Ctrl+P exports the session as a PDF. Esc closes this.
In the Notebook: Enter starts a new block and
Shift+Enter a new line inside one; Backspace at the start
joins back into the paragraph above; / on an empty line inserts anything.
⌘/Ctrl+B, I, E, H and
M apply bold, italic, code, highlight and maths.
#, ##, -, 1., > and
``` at the start of a line convert it.
Sign in to run unlimited analyses.
Scroll to pan · Esc to close