EconStatsCraft › Monte Carlo experiment

Monte Carlo experiment

Estimates the same model on thousands of synthetic samples so you can see the sampling distribution itself, not one draw from it. It is the only way to check whether the standard errors are telling the truth - the coverage of a nominal 95% interval is measured rather than assumed.

The intuition

Every other module estimates something from data you cannot check. Monte Carlo inverts that: you choose the truth, generate data from it, run the estimator thousands of times, and compare what it reports against what you know. It is the only way to see an estimator's properties directly rather than taking a theorem's word for it - and the only way to find out what happens when the theorem's conditions do not hold.

When to use it

To settle any question of the form "does this matter". Every other result in this app is ONE draw from a sampling distribution, with the standard error as an estimate of that distribution’s width taken on faith. This is the only place you can check whether that faith is warranted.

Where the estimator comes from

Fix a data-generating process with known parameter \beta. For r=1,\dots,R: draw a sample, compute \hat{\beta}_r and its reported standard error \widehat{\mathrm{se}}_r, and record whether the nominal 95% interval covered \beta. Then BIAS is \frac{1}{R}\sum_r\hat{\beta}_r-\beta; the TRUE standard error is the standard deviation of \{\hat{\beta}_r\} across replications; and COVERAGE is the share of intervals containing \beta, which should be 0.95. The Monte Carlo standard error of a coverage estimate is \sqrt{p(1-p)/R}, so R=3{,}000 pins a coverage near 0.95 to about \pm0.4 percentage points - precise enough that a reading of 0.776 is unambiguous.

The model

\text{coverage} = \frac{1}{R}\sum_{r=1}^{R} \mathbf{1}\left[\,|\hat\beta_r - \beta| \le 1.96\,\widehat{se}_r\,\right]

What it assumes

Statistical properties

How to read the output

A worked reading

Generate 3,000 samples of 100 observations with heteroskedastic errors and a true slope of 1, then estimate by OLS with CLASSICAL standard errors. The mean estimate is 1.0046, so bias is 0.0046 - OLS is unbiased under heteroskedasticity, exactly as the theory says. But the estimates actually spread with a standard deviation of 0.2734 while the average reported standard error is 0.1723, only 63.0% of the truth. Coverage of the nominal 95% interval is 77.6%. Nothing is wrong with the coefficient; everything is wrong with the confidence interval, and that is the distinction the whole exercise exists to make visible.

Symptom → diagnosis → what to do

If you see thisIt meansDo this
Coverage well below 95%Standard errors too smallThe reported uncertainty is understated
Coverage above 95%Standard errors too largeConservative: valid but wasteful of power
Bias near zero, coverage poorThe point estimate is fine, the SE is notThe commonest and most dangerous pattern
Results changing with the seedToo few replicationsRaise R and report the Monte Carlo standard error
Estimates below the truth far from 50%A skewed sampling distributionThe symmetric interval is the wrong shape
Everything perfectThe DGP matches the estimator exactlyBreak an assumption; that is the interesting experiment

Common mistakes

Where to read this properly

See also

OLS diagnostics, for detecting on real data what this demonstrates on simulated. Bootstrap, which resamples data rather than generating it.

Related Tests & breaks

F-test, Wald & Chow · Structural breaks & stability

All analyses

Charts

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

Maps

World map · Bivariate map · Flow map · India - state map · India - district map

Explore

Descriptive statistics · Summary by group · Two-way table · Classical statistical tests

Regression

Multiple regression (OLS) · Logit / Probit · Tobit (censored) · Truncated regression · Multinomial logit · Ordered logit / probit · Quantile regression · Poisson / Negative binomial

Time series - one series

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

Time series - several series

Yield curve (Nelson–Siegel / Svensson) · Dynamic factor model · Dynamic regression (ARIMAX) · Structural VAR · VAR · Granger causality · Cointegration · VECM · ARDL & bounds test

Panel data

Panel regression · Panel cointegration tests · Heterogeneous panel: Mean Group & PMG · Gravity model of trade · Dynamic panel GMM · Panel diagnostics · Panel unit-root tests

Multivariate statistics

Principal components (PCA) · Factor analysis · Cluster analysis

Marketing research

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

Causal

Spatial autocorrelation · Spatial regression · Heckman selection · Instrumental variables (2SLS) · Difference-in-differences · Staggered difference-in-differences · Regression discontinuity · Matching & weighting · Oaxaca–Blinder decomposition

Finance & risk

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)

Actuarial

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

Tests & breaks

Monte Carlo experiment · F-test, Wald & Chow · Structural breaks & stability

Machine learning

Regression vs machine learning · Ridge / Lasso / Elastic Net · Random forest · Gradient boosting

Open the workspace →

Starting engine…

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.