BookmarkSubscribeRSS Feed
pablas29
Fluorite | Level 6

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.

1 REPLY 1
StatDave
SAS Super FREQ

First, since your response is binary, you should specify DIST=BINARY or BINOMIAL in the MODEL statement in GLIMMIX. However, there are many ways to analyze repeated measures/panel data like this. The random effects model is one way. Another is the Generalized Estimating Equations (GEE) model, available in PROC GEE or PROC GENMOD. There is also the conditional logistic model available in PROC LOGISTIC with the STRATA statement. See this note regarding types of logistic models. 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 504 views
  • 1 like
  • 2 in conversation