BookmarkSubscribeRSS Feed
Fable
Fluorite | Level 6

Hi, I am trying to conduct an interrupted time series analysis looking at lab test rates (outcome) and how they changed due to the COVID shelter-in-place order in March 2020. 

 

I am making use of this paper to guide me: Time After Time: Difference-in-Differences and Interrupted Time Series Models in SAS

I have a individual level dataset of patients with multiple records per patient, one for each month they are in the cohort. From what I understand, since I am looking at testing rates, I could either model this with the individual data as a binary outcome (ie have an flag set to 1 if the patient in a particular month had a test and 0 if they did not) OR I could aggregate the patient level data so that I have the overall testing rate as a percentage per month, meaning I could then model it as a continuous outcome.

 

Does anyone know what the difference would be for each approach?

 

From what the linked paper makes it seem like, I should use the GENMOD Procedure if I want to do it as a binary outcome, and use the MIXED Procedure if I want to do it as an aggregated continuous outcome. 


The paper provides an example of how to use PROC MIXED for a continuous outcome, but how would I use PROC GENMOD for a binary one? The paper says:

 

These proportions can be estimated using PROC GENMOD as odds or probabilities on the log scale (relative risks) or as proportions (absolute risks) for each group at each time point.

How would one specify if they want relative risks or absolute risks with PROC GENMOD? How does one interpret each?


Thank you.

1 REPLY 1
StatDave
SAS Super FREQ

The section of this note discussing non-identity link models might prove helpful.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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
  • 656 views
  • 0 likes
  • 2 in conversation