BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
marina_unn
Fluorite | Level 6

Dear SAS programmers,

 

I have a question about MIXED procedure. I apply the MIXED to a longitudinal study, where mental health scores were measured for each patinent 7 times, with an interval of about 1 year. So, patient is my random intercept and time is my random slope in this model. I also include covaraites, such as if patient earlier (before inclusion in the study) had diabetes ("tdiabetes" variables) or if they earlier had storke ("tslag" variable). I have many more covariates, but for asking the quesiton I simplified the model to just 2.

 

Here is the procedure:

proc mixed data=ecs_models4 empirical;
class id timeclass 
	tdiabetes tslag / ref=first;

model ecs=
  tdiabetes tslag / noint solution corrb e3;
random intercept time_num/ type=un subject=id g v;
repeated timeclass/ type=simple subject=id r;
run;

In the output, I get a Solution for Fixed effects table and Type3 effects table (both are attached below). What I don't understand is why in the Solution table, the first class variables (here it is TDIABETES) has estimated for each level, 1 and 0, rather than an estimate for level 1 in reference to estimate at level 0, as for TSLAG variable?

 

solution.pngtype3.png

 

This is confusing for me also because for TDIABETES Solution and Type3 results are not the same. 

 

Can somebody provide a little hint to understanding this output of MIXED? Is there anything wrong in my model setup?

 

Thank you in advance!

 

Marina

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hello @marina_unn,

 

I think it's just the NOINT option which causes this effect. For subjects with both CLASS effects at their reference levels, i.e., TDIABETES=TSLAG=0, the response variable (ECS) will usually not happen to be zero. Without the NOINT option the estimated non-zero amount would go into the intercept, while the contributions of both model variables are zero. With the NOINT option, however, PROC MIXED pushes it into the coefficient of the reference category of the first CLASS variable in the MODEL statement.

 

See this toy example:

data have;
input c y;
cards;
0 1
1 2
1 3
;

proc mixed data=have;
class c;
model y=c / /* noint */ solution;
run;

The (2+3)/2=2.5 moves from the intercept to the coefficient of reference level c=1 (default is REF=LAST) when the NOINT option is activated.

View solution in original post

4 REPLIES 4
PaigeMiller
Diamond | Level 26

These two test different hypotheses, so they do not have to agree!

 

The Solution for Fixed effects tests to see if the Estimate is equal to zero. In both cases the p-value is <0.0001 which indicates these estimates are statistically different from zero.

 

The Type 3 test is a test to see if the two levels of TDIABETES are equal to one another (or that the values 77.835 and 83.1827 are equal to one another). They are not equal with alpha = 0.05 (or p-value 0.0036)

--
Paige Miller
FreelanceReinh
Jade | Level 19

Hello @marina_unn,

 

I think it's just the NOINT option which causes this effect. For subjects with both CLASS effects at their reference levels, i.e., TDIABETES=TSLAG=0, the response variable (ECS) will usually not happen to be zero. Without the NOINT option the estimated non-zero amount would go into the intercept, while the contributions of both model variables are zero. With the NOINT option, however, PROC MIXED pushes it into the coefficient of the reference category of the first CLASS variable in the MODEL statement.

 

See this toy example:

data have;
input c y;
cards;
0 1
1 2
1 3
;

proc mixed data=have;
class c;
model y=c / /* noint */ solution;
run;

The (2+3)/2=2.5 moves from the intercept to the coefficient of reference level c=1 (default is REF=LAST) when the NOINT option is activated.

marina_unn
Fluorite | Level 6

Many thanks, @FreelanceReinh for the explanation about NOINT option.

I will consider if I need this option at all in my model.

 

If  you know any literature or SAS guides that explain when NOINT option makes most sense, please let me know. The MIXED procedure help pages do not explain much, unfortunately.

Ksharp
Super User
I think Type3 Tests of Fixed Effects is to check if this variable is significant(P<0.05) or not in model.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 4 replies
  • 676 views
  • 5 likes
  • 4 in conversation