Forecasting using SAS Forecast Server, SAS/ETS, and more

Three dimensional panel data analysis in SAS

Reply
New Contributor
Posts: 2

Three dimensional panel data analysis in SAS

Hi,

 

This is my first post on this forum. I have a question specific to performing panel data regression in SAS.

My data structure is three dimensional i.e. Country1, Country2 forms the cross-section and time series. I'd like to include variables that can explain country1 specific effect, country2 specific effect and country1-country2 relationship effects. For this I have decided to use panel data analysis having three dimension. But i donot know how to include the second cross-section into the ID statement to identify the two dimensions of cross-section.

 

Please reply if any part of the problem statement is unclear. I'll try to add more information if required. Any help will be highly appreciated. Thanks!

 

SAS Employee
Posts: 49

Re: Three dimensional panel data analysis in SAS

Can you provide more details?  Please describe what is/are the response variable (or variables), what are the panel variables, what is the time id variable, what are the predictors.  A few rows of your input data set would provide concreteness to the description.  Additionally, describe the statistical model that you want to fit--don't worry about the syntax of any procedure--just want to know the mathematical form of the model in terms of your data variables and error terms. 

New Contributor
Posts: 2

Re: Three dimensional panel data analysis in SAS

Cross-section id variables are sending country (source) and receiving country (destination). Time id variable is months. The response variable is attrition in terms of number of people across various corridors (source-destination forms one corridor). Predictor variables can be grouped as price variables, origin specific variables, destination specific variables and origin-destination relationship variables.

I haven't fit the data into any model but I wanted to use the approach of n-dimensional panel data analysis due to the data structure. I can re-shape the data to fit the conventional 2-dimensional panel data analysis approach but I'd like to include the specific and relational effects of source and destination countries as specified in the original post.
SAS Employee
Posts: 49

Re: Three dimensional panel data analysis in SAS

Without knowing what type of model you want to fit, it will be difficult to privide an informative answer (or whether it can even be done).  In any event, I am going to privide possible places (in SAS) you could look for the solution to your problem.

 

Suppose y_ijt is the response variable associated with i-th source and j-th destination, at time t.  Similarly, X_ijkt denotes k-th predictor variable (for i-th source and j-th destination, at time t).  You want to model y_ijt and the model could have regression terms associated with X_ijkt, various fixed and random effects associated with i, j, t, and a variety of error terms.  You might also have lagged y_ijt (and or X_ijkt).  These types of models can be handled by a few different procedures in SAS.  Three of these are: PANEL (in SAS/ETS), MIXED (in SAS/STAT) and SSM (in SAS/ETS).  Each of these will have some advantages and some disadvantages. 

 

PROC PANEL is specially designed for panel data types.    PROC MIXED can also fit a variaty of mixed effects models.  You can create different interaction variables (by DATA step and by the use of CLASS variables).  PROC SSM can also be used for such models but you must first formulate your model as a state space model.  Please consult the documentation (and solved examples in the doc) for additional information.

Ask a Question
Discussion stats
  • 3 replies
  • 184 views
  • 1 like
  • 2 in conversation