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 › Logit / Probit
For a 0/1 outcome. Reports coefficients, average marginal effects (the number you should quote), odds ratios, a classification table and the ROC curve.
Imagine a latent "propensity" y* = xβ + u that you never see; you only observe whether it crossed zero. Logit assumes u is logistic, probit assumes Normal. The S-shape is not a modelling flourish - it is what a probability must look like if it is to stay inside [0, 1] while the index xβ ranges over the whole real line.
The dependent variable takes exactly two values: employed or not, defaulted or not, voted or not.
With P(y=1\mid x)=F(x'\beta), the log-likelihood is \ell(\beta)=\sum_i\left[y_i\log F(x_i'\beta)+(1-y_i)\log\bigl(1-F(x_i'\beta)\bigr)\right], which is globally concave for both logit and probit - so the maximum is unique and the optimiser cannot get stuck in a local mode. There is no closed form; it is solved numerically.
P(y=1\mid \mathbf{x})=\Lambda(\mathbf{x}^{\prime}\boldsymbol{\beta})=\frac{e^{\mathbf{x}^{\prime}\boldsymbol{\beta}}}{1+e^{\mathbf{x}^{\prime}\boldsymbol{\beta}}}\quad\text{(logit)}
Insurance status for 2,000 people, 35.3% of them insured. β̂_educ = 0.1129 in the logit, so exp(0.1129) = 1.1195: each extra year of schooling raises the ODDS of being insured by about 12%. The average marginal effect is 0.0245 - two and a half extra percentage points on the PROBABILITY per year - and that is the number to report, because the odds ratio is constant by construction while the effect on the probability is not: it is largest for people near 50% predicted and small at either extreme. Note also McFadden's pseudo-R² of 0.0373. That is not an R² and does not mean the model explains 4% of anything; values around 0.2 already indicate a good fit on this scale, and comparing it to a regression R² is a category error that appears in a great many dissertations.
| If you see this | It means | Do this |
|---|---|---|
| A coefficient explodes with a huge standard error | Perfect or quasi-complete separation | Drop or combine that regressor; consider penalised (Firth) logit |
| Accuracy high but AUC near 0.5 | The model just predicts the majority class | Compare against the base rate; look at sensitivity, not accuracy |
| Marginal effects differ a lot from the coefficients | Normal - the coefficients are on the latent index scale | Always quote marginal effects |
| Predicted probabilities bunch at 0 or 1 | Over-fitting, or a near-separating regressor | Simplify, or check for a variable that encodes the outcome |
| Rare outcome (under ~5%) | Small-sample bias in ML | Use penalised likelihood, or rare-events logit (King & Zeng) |
Ordered or multinomial logit for more than two categories; the linear probability model (just OLS) when you want easily interpretable marginal effects and do not care about out-of-range predictions.
Multiple regression (OLS) · Tobit (censored) · Truncated regression · Multinomial logit · Ordered logit / probit · Quantile regression · Poisson / Negative binomial
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