BookmarkSubscribeRSS Feed
Calcite | Level 5



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:

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!

Diamond | Level 26

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.

Paige Miller



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is Bayesian Analysis?

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.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 2 in conversation