## 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.

### 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.`DataTable`

contains the same observations and has the same dimensionality as`Data`

.`DataTimeTable`

— A timetable of data.`DataTimeTable`

contains the same observations and has the same dimensionality as`Data`

.`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
table.`DataSetName`

loadDataSetName

Data Set Name | Description |
---|---|

`Data_Accidental` | Monthly number of accidental deaths in the US, 1973–1978 |

`Data_Airline` | Monthly number of international airline passengers, 1949–1960 |

`Data_Canada` | Canadian inflation and interest rates, 1954–1994 |

`Data_CarbonEmissions` | Annual global carbon emissions from fossil fuel combustion and industry, 1901–2021 |

`Data_Consumption` | US food consumption, 1927–1962 |

`Data_CreditDefaults` | Investment-grade corporate bond defaults and four predictors, 1984–2004 |

`Data_Danish` | Danish stock returns, bond yields, 1922–1999 |

`Data_DieboldLi` | U.S. Treasury unsmoothed Fama-Bliss zero-coupon yields and macroeconomic factors, 1972–2000 |

`Data_ElectricityPrices` | Simulated daily electricity spot prices, 2010–2013 |

`Data_EquityIdx` | U.S. equity indices, 1990–2001 |

`Data_ExchangeRates` | Monthly exchange rates for the US dollar, Jan. 1947 – Aug. 2021 |

`Data_FXRates` | Currency exchange rates, 1979–1998 |

`Data_GDP` | U.S. Gross Domestic Product, 1947–2005 |

`Data_GlobalIdx1` | Global large-cap equity indices, 1993–2003 |

`Data_GNP` | U.S. Gross National Product, 1947–2005 |

`Data_Income1` | Simulated data on income and education |

`Data_Income2` | Average annual earnings by educational attainment in eight workforce age categories |

`Data_JAustralian` | Johansen's Australian data, 1972–1991 |

`Data_JDanish` | Johansen's Danish data, 1974–1987 |

`Data_MarkPound` | Deutschmark/British Pound foreign-exchange rate, 1984–1991 |

`Data_NelsonPlosser` | Macroeconomic series of Nelson and Plosser, 1860–1970 |

`Data_Overshort` | Daily overshorts from an underground gasoline tank in Colorado. 57 consecutive days |

`Data_PowerConsumption` | Canadian electrical power consumption and GDP, 1960–2009 |

`Data_RecessionIndicators` | Monthly indicators of recession and expansion, Jan. 1921 – Jan. 2023 |

`Data_Recessions` | U.S. recession start and end dates, 1857–2022 |

`Data_SchwertMacro` | Macroeconomic series of Schwert, 1947–1985 |

`Data_SchwertStock` | Indices of U.S. stock prices, 1871–2008 |

`Data_TBill` | Three-month U.S. treasury bill secondary market rates, 1947–2005 |

`Data_USEconModel` | U.S. macroeconomic series, 1947–2009 |

`Data_USEconVECModel` | 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.

### Featured Examples

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
table.

openExample('econ/exampleName')

Example Name | Title | Description |
---|---|---|

`AnalyzeLinearizedDSGEModelsExample` | Analyze Linearized DSGE Models | Analyze the dynamic stochastic general equilibrium (DSGE) model in [77] by using Bayesian state-space model tools. |

`Demo_ClassicalTests` | Classical Model Misspecification Tests | Perform classical model misspecification tests. |

`Demo_DieboldLiModel` | 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. |

`Demo_HPFilter`
| Use Hodrick-Prescott Filter to Reproduce Original Result | Use the Hodrick-Prescott filter to reproduce their original result. |

`Demo_RiskFHS` | Using Bootstrapping and Filtered Historical Simulation to Evaluate Market Risk | Use bootstrapping and filtered historical simulation to evaluate market risk |

`Demo_RiskEVT` | Using Extreme Value Theory and Copulas to Evaluate Market Risk | Use extreme value theory and copulas to evaluate market risk |

`Demo_TSReg1` | Time Series Regression I: Linear Models | Introduce basic assumptions behind multiple linear regression models |

`Demo_TSReg2` | Time Series Regression II: Collinearity and Estimator Variance | Detect correlation among predictors and accommodating problems of large estimator variance |

`Demo_TSReg3` | Time Series Regression III: Influential Observations | Detect influential observations in time series data and accommodating their effect on multiple linear regression models |

`Demo_TSReg4` | Time Series Regression IV: Spurious Regression | Investigate trending variables, spurious regression, and methods of accommodation in multiple linear regression models |

`Demo_TSReg5` | Time Series Regression V: Predictor Selection | Select a parsimonious set of predictors with high statistical significance for multiple linear regression models |

`Demo_TSReg6` | Time Series Regression VI: Residual Diagnostics | Evaluate model assumptions and investigating respecification opportunities by examining the series of residuals |

`Demo_TSReg7` | Time Series Regression VII: Forecasting | Present the basic setup for producing conditional and unconditional forecasts from multiple linear regression models |

`Demo_TSReg8` | Time Series Regression VIII: Lagged Variables and Estimator Bias | Examine how lagged predictors affect least-squares estimation of multiple linear regression models |

`Demo_TSReg9` | Time Series Regression IX: Lag Order Selection | Illustrate predictor history selection for multiple linear regression models |

`Demo_TSReg10` | 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 |

`Demo_USEconModel` | 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 |

`ModelAndSimulateElectricitySpotPricesUsingSkewNormalExample` | 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. |