Panel Data: Linear Regression

About the Panel Data: Linear Regression Task

The Panel Data: Linear Regression task analyzes a class of linear econometric models that commonly arise when time series and cross-sectional data are combined. This type of pooled data on time series cross-sectional bases is often referred to as panel data. Typical examples of panel data include observations over time on households, countries, firms, trade, and so on. For example, in the case of survey data on household income, the panel is created by repeatedly surveying the same households in different time periods (years).
Note: The version of the task depends on what version of SAS/ETS is available at your site. For example, if your site is running the second maintenance release for SAS 9.3, SAS/ETS 12.1 is available, and SAS Studio is running version 1 of the Panel Data: Linear Regression task. If you are running SAS 9.4, SAS/ETS 12.3 is available, and SAS Studio is running version 2 of the Panel Data: Linear Regression task. The difference between the two versions is the addition of new options in SAS/ETS 12.3.

Example: Linear Regression with Panel Data

To create this example:
  1. Create the WORK.GREENE data set. For more information, see GREENE Data Set.
  2. In the Tasks section, expand the Econometrics folder and double-click Panel Data: Linear Regression. The user interface for the Panel Data: Linear Regression task opens.
  3. On the Data tab, select the WORK.GREENE data set.
  4. Assign columns to these roles:
    Role
    Column Name
    Dependent variable
    cost
    Continuous variables
    production
    Cross-sectional ID
    firm
    Time series ID
    year
  5. To run the task, click Submit SAS Code.
Example of Results from the PANEL Procedure

Assigning Data to Roles

To run the Panel Data: Linear Regression task, you must assign columns to the Dependent variable, Cross-sectional ID, and Time series ID roles.
Role
Description
Dependent variable
specifies the numeric column that contains the count values. The dependent count variable should take on only nonnegative integer values in the input data set.
Continuous variables
specifies the independent covariates (regressors) for the regression model. If you do not specify a continuous variable, the task fits a model that contains only an intercept.
Categorical variables
specifies the variables to use to group data in the analysis.
Cross-sectional ID
specifies the cross section for each observation. The task verifies that the input data is sorted by the cross-sectional ID and by the time series ID within each cross section.
Time series ID
specifies the time period for each observation. The task verifies that the time series ID values are the same for all cross sections.

Setting Options

Option
Description
Model
Model type
specifies that a one-way random-effects model be estimated or a one-way fixed-effects model be estimated with the one-way model corresponding to cross-sectional effects only.
Note: The remaining options that are available in the Model Options section depend on whether you are creating a random or fixed effect.
Include the intercept in the model
specifies whether to include the model. This option applies whether you are creating a random effects model or a fixed effects model.
Note: This option is available only if you are running on SAS 9.4.
Random Effects
Random effects
specifies whether a one-way or two-way random-effects model is estimated. By default, a one-way random-effects model is estimated.
Variance component estimation method
specifies the type of variance component estimate to use. For more information about the type of estimations, see the PANEL procedure in SAS/ETS User’s Guide.
Test for Random Effects
One-way Breusch-Pagan test
Two-way Breusch-Pagan test
requests the Breusch-Pagan one-way or two-way test for random effects.
Fixed Effects
Fixed effects
specifies whether a one-way or two-way fixed-effects model is estimated.
Display the fixed effects
specifies whether to include the fixed effects in the results.
Note: This option is available only if you are running on SAS 9.4.
Methods
Covariance matrix estimator
specifies the estimator of the covariance matrix. You can select from these options:
  • Newey and West
    Note: This option is available only if you are running on SAS 9.4.
  • OLS estimator specifies that the variance-covariance matrix is not corrected.
  • HCCME 0–4 specifies a heteroscedasticity-corrected covariance matrix
Cluster correction for heteroscedasticity-consistent covariance matrix
specifies the cluster correction for the variance-covariance matrix.

Setting the Output Options

Option
Description
Plots
Diagnostic Plots
You can display these types of diagnostic plots:
  • Plot of the predicted and actual values
  • QQ plot of residuals
  • Plot of residuals
  • Histogram of residuals
Cross Sections Plots
The number of cross sections to be combined into one time series plot
specifies the number of cross sections to be combined into one time series plot.
Note: This option is available only if you display the plots individually.
You can display these types of cross-sectional plots:
  • Plot of actual values by time series
  • Predicted values by time series
  • Stacked residuals by time series
  • Residuals by time series
Display plots
specifies whether to display the plots in a panel or individually.
Output Tables
You can specify whether the results include the tables created by the task by default, the default tables and any additional tables that you select, or no tables.
Here is the information that you can include in the results:
  • correlation matrix of the parameter estimates
  • covariance matrix of the parameter estimates
  • iteration history of the objective function and parameter estimates