- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I am currently analyzing the impact of an intervention on medication numbers using difference-in-difference analysis, but I have encountered several challenges.
Following the SAS support instructions, I conducted the difference-in-difference analysis. However, I noticed a discrepancy between my results and SAS's example (Usage Note 61830: Estimating the difference in differences of means).
In the example, the value of 'Mean Estimate' in 'Contrast Estimate Results' is identical to the 'Estimate' in 'Least Squares Means Estimate'. However, in my case, these values were different. I suspect this could be due to my use of the negative binomial distribution with a log link, resulting in exponential values. Consequently, I am unsure whether to rely on the 'Mean Estimate' in 'Contrast Estimate Results' or the 'Estimate' in 'Least Squares Means Estimate', and how to interpret the results."
Contrast Estimate Results
Label | Mean Estimate | Mean Confidence Limits | L'Beta Estimate | Standard Error |
diff in diff | 1.51 | 1.49 | 0.41 | 0.0051 |
a*b Least Squares Means
a | b | Estimate | Standard Error | z value | Pr > |z| |
1 | 1 | 0.77 | 0.00434 | 178.19 | <.0001 |
1 | 0 | 0.03 | 0.00508 | 6.5 | <.0001 |
0 | 1 | 0.72 | 0.00408 | 177.71 | <.0001 |
0 | 0 | 0.40 | 0.00426 | 93.11 | <.0001 |
Least Squares Means Estimate
Effect | Label | Estimation | Standard Error | z value | Pr > |z| |
time*hospitalize | diff in diff | 0.41 | 0.00509 | 81.01 | <.0001 |
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
This is the same question as posted in the programming board.
Home > Programming > Programming > Difference-in-difference
https://communities.sas.com/t5/SAS-Programming/Difference-in-difference/m-p/927128
Please do not duplicate your question on multiple boards.
Also take the right board. I will move this one to "Statistical Procedures"-board in a minute.
Koen
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
"Because this is not a linear combination of the model parameters or of the LS-means, you cannot use the ESTIMATE or LSMESTIMATE statements to estimate the difference in differences of means. "
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for providing clarification on this issue! It's really helpful for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If the outcome is not binary, I cannot use logistic regression in DID, right?
The outcome of my study is the number of medications, which is not the binary outcome. The outcome is continuous, however, it is a gamma distribution, so I used a log link to address the right-skew problem. I think that it could not use the DID with normal distribution, is there any suggestion for analysis of gamma distribution outcome in DID? Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your response.