Hi,
I am conducting comparative interrupted time series with fixed effects analysis. Basically I am trying to model the pre-post difference for each entity and to test whether the pre-post difference is significant depending on the group(which I call D1 below) that the entity belongs to. This is what I've tried so far using proc glm:
PROC GLM;
ABSORB entity;
MODEL Y = year post yearXpost D1 yearXD1 postXD1 yearXpostXD1;
TEST1: test post + yearXpost + postXD1 + postXyearXD1 =0;
RUN;
[SAS Version 9.4]
Q1: Is proc glm or proc mixed more suitable for conducting fixed effects analysis? Is this considered repeated measures since year is already modelled?
Q2: How do I conduct the test of linear combinations using either procedure? I know that stata calls it LINCOM, and for normal regression, TEST does it within SAS, but not sure how to do this for fixed effects using either of the procedures above...
Thank you very much!
1. The choice of GLM or MIXED depends on the error structure, and not the fact that you want have a fixed effect model or you want to test a linear combination. GLM assume the errors a iid normally distributed. MIXED allows for errors to be non-iid errors.
2. I believe you would use the ESTIMATE statement in GLM (and I think in MIXED) to obtain the estimate for your linear combination. Since you have no CLASS variables, you could also use PROC REG and the TEST command.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.