BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
lboyd
Calcite | Level 5

I've done a bit of reading and gathered I need to run a Poisson regression. I transformed the data into long and ran this:
proc genmod data=long;
class time eid;
model score= time / dist = poisson
link = log;
repeated subject=eid / corr=exch corrw;
run;

The repeated subject line takes into account the paired data, correct? Do I include time in the class statement because I've seen it both ways? I used exchanged since I saw that in an example, but I know there is much more to it.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

If you have just two repeated observations per subject, then all correlation structures other than CORR=IND are the same since there is only a single correlation parameter to estimate. You would specify TIME in the CLASS statement if you want the model to allow for any association of time with the response. If you leave it out of the CLASS statement, then the model is restricted to time having a linear effect. Yes, using the REPEATED statement uses a Generalized Estimating Equations (GEE) analysis with accounts for the correlation within subjects. 

View solution in original post

3 REPLIES 3
StatDave
SAS Super FREQ

If you have just two repeated observations per subject, then all correlation structures other than CORR=IND are the same since there is only a single correlation parameter to estimate. You would specify TIME in the CLASS statement if you want the model to allow for any association of time with the response. If you leave it out of the CLASS statement, then the model is restricted to time having a linear effect. Yes, using the REPEATED statement uses a Generalized Estimating Equations (GEE) analysis with accounts for the correlation within subjects. 

lboyd
Calcite | Level 5

If I have three repeated observations per subject, what CORR can I use?

StatDave
SAS Super FREQ

You can use any of the available correlation structures. Choose the one that matches the pattern of correlations that you suspect exist among your repeated measures. The exchangeable (TYPE=EXCH) structure assumes that all pairs of repeated measures have the same correlation. The unstructured correlation matrix (TYPE=UN) allows all pairs of repeated measures to have different correlations. This is the most general structure but also requires the most correlations to be estimated and can therefore result in model fitting errors. Other structures (like TYPE=AR) allow for degradation of the correlation for pairs of repeated measures farther apart (such as when measures are done over time). 

 

For more, see this note

 

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!

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
  • 3 replies
  • 1337 views
  • 3 likes
  • 2 in conversation