01-31-2017 07:35 AM
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!
02-02-2017 01:17 PM
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.
02-06-2017 02:59 AM
02-06-2017 09:23 AM
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.