I have panel data and I ran the below SAS code to get the coefficients.
PROC GLIMMIX DATA=data1 ;
CLASS pid year;
MODEL employed(event='Yes')= age / SOLUTION ;
RANDOM INTERCEPT/ SUBJECT = pid ;
RUN;
PROC PANEL DATA=data1;
MODEL employed = age /RANone ;
ID pid year;
RUN;
I tried doing a similar thing using Stata as below but the results between SAS and Stata output are different.
xtset pid year
xtlogit employed age
I am not sure which is the correct result? Also, do I need to add any option when running similar code on unbalanced panel data?
Balanced data panel example:
pid |
year |
age |
employed |
1 |
2001 |
33 |
yes |
1 |
2002 |
34 |
no |
1 |
2003 |
35 |
yes |
2 |
2001 |
23 |
yes |
2 |
2002 |
24 |
yes |
2 |
2003 |
25 |
yes |
Cross-posted.