BookmarkSubscribeRSS Feed
avinash279
Calcite | Level 5

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!

 

3 REPLIES 3
rselukar
SAS Employee

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. 

avinash279
Calcite | Level 5
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.
rselukar
SAS Employee

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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 950 views
  • 1 like
  • 2 in conversation