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 your site is running SAS 9.4 or later and SAS/ETS 12.3 or later is available, then 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 or later.

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 the Model Options

Option
Description
Model
Model type
specifies whether to create a random effects model or a fixed effects model.
Note: The remaining options that are available in this 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 or later.
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 or later.

Setting Options

Option
Description
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 or later.
  • OLS estimator specifies that the variance-covariance matrix is not corrected.
  • HCCMEn specifies a heteroscedasticity-corrected covariance matrix. n is a value from 0–4.
Cluster correction for heteroscedasticity-consistent covariance matrix
specifies the cluster correction for the variance-covariance matrix.
Note: This option is available only if you select one of the HCCME0-3 options for the covariance matrix estimator.
Statistics
You can specify whether the results include the statistics that the task creates by default, the default statistics and any additional statistics that you select, or no statistics.
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
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 by observation
  • Histogram of residuals
Cross Sections Plots
You can display these types of plots:
  • Plot of actual values by time series
  • Predicted values by time series
  • Stacked residuals by time series
  • Residuals by time series
Number of cross sections in 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 select Individual plots for the Display as option.
Display as
specifies whether to display the plots in a panel or individually.