Data Sets and Examples
Econometrics Toolbox™ features historical data sets and examples for use with its functions. The data sets include a diverse collection of macroeconomic time series you can use to estimate models, experiment, or establish benchmarks. The featured examples demonstrate common workflows in econometric analysis and explore connections among related toolbox functions by using the data sets.
Generally, each data set is a MAT file containing the following variables:
Data— A matrix of data. Each column is a variable (time series). Each row contains associated observations of the variables.
DataTable— A table of data.
DataTablecontains the same observations and has the same dimensionality as
DataTimeTable— A timetable of data.
DataTimeTablecontains the same observations and has the same dimensionality as
Description— Textual data set description, including data set variable definitions and references.
series— Vector of descriptive variable names.
To load the variables of a data set into the MATLAB® Workspace, enter the following command at the MATLAB command line, where
is one of the MAT
files in the
|Data Set Name||Description|
|Monthly number of accidental deaths in the US, 1973–1978|
|Monthly number of international airline passengers, 1949–1960|
|Canadian inflation and interest rates, 1954–1994|
|US food consumption, 1927–1962|
|Investment-grade corporate bond defaults and four predictors, 1984–2004|
|Danish stock returns, bond yields, 1922–1999|
|U.S. Treasury unsmoothed Fama-Bliss zero-coupon yields and macroeconomic factors, 1972–2000|
|Simulated daily electricity spot prices, 2010–2013|
|U.S. equity indices, 1990–2001|
|Currency exchange rates, 1979–1998|
|U.S. Gross Domestic Product, 1947–2005|
|Global large-cap equity indices, 1993–2003|
|U.S. Gross National Product, 1947–2005|
|Simulated data on income and education|
|Average annual earnings by educational attainment in eight workforce age categories|
|Johansen's Australian data, 1972–1991|
|Johansen's Danish data, 1974–1987|
|Deutschmark/British Pound foreign-exchange rate, 1984–1991|
|Macroeconomic series of Nelson and Plosser, 1860–1970|
|Daily overshorts from an underground gasoline tank in Colorado. 57 consecutive days|
|Canadian electrical power consumption and GDP, 1960–2009|
|U.S. recession start and end dates, 1857–2022|
|Macroeconomic series of Schwert, 1947–1985|
|Indices of U.S. stock prices, 1871–2008|
|Three-month U.S. treasury bill secondary market rates, 1947–2005|
|U.S. macroeconomic series, 1947–2009|
|U.S. macroeconomic series 1957–2016 and projections for the following 10 years from the Congressional Budget Office|
Unlisted data sets that you load in some examples are accessible only through the documentation. For help installing the Econometrics Toolbox documentation and those data sets, see Help Preferences.
You can access an example by clicking its title in the table. Then, to open the example script, click Open Live Script .
Alternatively, if you have the Econometrics Toolbox documentation installed, you can open an example script by entering
the following command at the MATLAB command line, where
exampleName is the
example name in the
|Analyze Linearized DSGE Models||Analyze the dynamic stochastic general equilibrium (DSGE) model in  by using Bayesian state-space model tools.|
|Classical Model Misspecification Tests||Perform classical model misspecification tests.|
|Apply State-Space Methodology to Analyze Diebold-Li Yield Curve Model||Analyze the popular Diebold-Li yields-only and yields-macro models of monthly yield-curve time series derived from U.S. Treasury bills and bonds by using state-space models and the Kalman filter.|
|Use Hodrick-Prescott Filter to Reproduce Original Result||Use the Hodrick-Prescott filter to reproduce their original result.|
|Using Bootstrapping and Filtered Historical Simulation to Evaluate Market Risk||Use bootstrapping and filtered historical simulation to evaluate market risk|
|Using Extreme Value Theory and Copulas to Evaluate Market Risk||Use extreme value theory and copulas to evaluate market risk|
|Time Series Regression I: Linear Models||Introduce basic assumptions behind multiple linear regression models|
|Time Series Regression II: Collinearity and Estimator Variance||Detect correlation among predictors and accommodating problems of large estimator variance|
|Time Series Regression III: Influential Observations||Detect influential observations in time series data and accommodating their effect on multiple linear regression models|
|Time Series Regression IV: Spurious Regression||Investigate trending variables, spurious regression, and methods of accommodation in multiple linear regression models|
|Time Series Regression V: Predictor Selection||Select a parsimonious set of predictors with high statistical significance for multiple linear regression models|
|Time Series Regression VI: Residual Diagnostics||Evaluate model assumptions and investigating respecification opportunities by examining the series of residuals|
|Time Series Regression VII: Forecasting||Present the basic setup for producing conditional and unconditional forecasts from multiple linear regression models|
|Time Series Regression VIII: Lagged Variables and Estimator Bias||Examine how lagged predictors affect least-squares estimation of multiple linear regression models|
|Time Series Regression IX: Lag Order Selection||Illustrate predictor history selection for multiple linear regression models|
|Time Series Regression X: Generalized Least Squares and HAC Estimators||Estimate multiple linear regression models of time series data in the presence of heteroscedastic or autocorrelated innovations|
|Model the United States Economy||Model the U.S. economy using a VEC model as a linear alternative to the Smets-Wouters DSGE macroeconomic model|
|Model and Simulate Electricity Spot Prices Using the Skew-Normal Distribution||Simulate the future behavior of electricity spot prices from a time series model fitted to historical data, and use the skew normal distribution to model the innovations process.|