BookmarkSubscribeRSS Feed
mag_newbie
Calcite | Level 5

Hello everybody,

I did a differnce-in-difference anlysis for in health care expenditures using proc genmod and %NLEstimate. People participating in a stuctured health care programme (Prog=1) were compared to those who do not participate (Prog=0). With data for both groups availabe for 1 year before intervention (post=0) and 1 year after intervention (post=1). The same subjects are measured before and after. The code I used works for the primary outcome "total cost". But now I need to analyse subcategories of costs, additinally (for hospitalisation, drugs,...) and some of these subcategories are zero-inflated.

 

Is there any option how I can make a DiD anaysis using zero-inflated data?

 

Any help would be greatly appreciated.

 

Maggie

 

proc genmod data= cost;
class prog post / ref= first;
model total_cost= prog post prog*post / dist=gamma link=log;
estimate "diff_in_diff" prog*post  1 -1 -1 1;
lsmeans prog*post  / e linik;
lsestimate prog*post "diff_in_diff" 1 -1 -1 1;
store out= gammod;
run; 

data difdif;
input k1-k4;
set=1;
datalines; 
1 -1 -1 1;

%NLEstimate (instore= gammod,
label= Diff in Diff
f=(exp(b_p1+b_p2+b_p4+b_p6) - exp(b_p1-b_p4)) - 
(exp(b_p1+b_p2) - exp(b_p1)), 
title= DiD Totel cost)

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 0 replies
  • 464 views
  • 0 likes
  • 1 in conversation