BookmarkSubscribeRSS Feed
harcluna
Calcite | Level 5

*/Hello,*/; 

 

*/I'm creating a mixed-effects repeated model (SAS v9.4 on Mac) to compare the value of y in men (0) versus women (1) over time (days). I would like to adjust for age and employment. I do have some missing values that are missing at random (as opposed to missing completely at random)*/;

 

data a;
input age employment sex pt_id day y;
cards;

48 1 0 1 0 39.00
48 1 0 1 1 24.00
48 1 0 1 2 .
48 1 0 1 3 .
48 1 0 1 4 .
48 1 0 1 5 17.00
48 1 0 1 6 18.00
48 1 0 1 7 16.00
48 1 0 1 8 .
48 1 0 1 9 19.00
48 1 0 1 10 19.00
48 1 0 1 11 21.00
48 1 0 1 12 21.00
48 1 0 1 13 24.00
48 1 0 1 14 .
48 1 0 1 15 .
48 1 0 1 16 .
48 1 0 1 17 .
48 1 0 1 18 .
48 1 0 1 19 .
48 1 0 1 20 .
48 1 0 1 21 .
33 0 0 2 0 37.00
33 0 0 2 1 .
33 0 0 2 2 24.00
33 0 0 2 3 .
33 0 0 2 4 .
33 0 0 2 5 19.00
33 0 0 2 6 .
33 0 0 2 7 .
33 0 0 2 8 .
33 0 0 2 9 22.00
33 0 0 2 10 .
33 0 0 2 11 .
33 0 0 2 12 27.00
33 0 0 2 13 27.00
33 0 0 2 14 27.00
33 0 0 2 15 .
33 0 0 2 16 .
33 0 0 2 17 .
33 0 0 2 18 .
33 0 0 2 19 .
33 0 0 2 20 .
33 0 0 2 21 .
39 1 0 3 0 34.00
39 1 0 3 1 13.00
39 1 0 3 2 .
39 1 0 3 3 .
39 1 0 3 4 .
39 1 0 3 5 .
39 1 0 3 6 .
39 1 0 3 7 .
39 1 0 3 8 .
39 1 0 3 9 .
39 1 0 3 10 .
39 1 0 3 11 .
39 1 0 3 12 .
39 1 0 3 13 .
39 1 0 3 14 .
39 1 0 3 15 .
39 1 0 3 16 .
39 1 0 3 17 .
39 1 0 3 18 .
39 1 0 3 19 .
39 1 0 3 20 .
39 1 0 3 21 .
30 0 1 4 0 31.00
30 0 1 4 1 .
30 0 1 4 2 17.00
30 0 1 4 3 14.00
30 0 1 4 4 13.00
30 0 1 4 5 .
30 0 1 4 6 .
30 0 1 4 7 .
30 0 1 4 8 .
30 0 1 4 9 .
30 0 1 4 10 .
30 0 1 4 11 .
30 0 1 4 12 .
30 0 1 4 13 .
30 0 1 4 14 .
30 0 1 4 15 .
30 0 1 4 16 .
30 0 1 4 17 .
30 0 1 4 18 .
30 0 1 4 19 .
30 0 1 4 20 .
30 0 1 4 21 .
79 1 1 5 0 22.50
79 1 1 5 1 26.00
79 1 1 5 2 23.00
79 1 1 5 3 .
79 1 1 5 4 23.50
79 1 1 5 5 22.00
79 1 1 5 6 23.00
79 1 1 5 7 .
79 1 1 5 8 .
79 1 1 5 9 .
79 1 1 5 10 .
79 1 1 5 11 .
;
run;

 

*/My code so far is */;

 

proc mixed data=a;
class sex employment;
model y=sex employment day sex*day age;

run;

 

*/Any help is much appreciated*/;

2 REPLIES 2
PaigeMiller
Diamond | Level 26

Hi, it doesn't appear you have actually asked a question that we can help with. It doesn't appear that you have stated a reason for dis-satisfaction for the results you are getting from your code.

--
Paige Miller
harcluna
Calcite | Level 5

Hello,

 

Sorry, for the ambiguity. My main question is I'm not sure if my code is adjusting for age and employment. This is my first time using the proc mixed function for this sort of model and I wanted to be sure my code was appropriate.

 

Thanks again.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 2 replies
  • 1245 views
  • 0 likes
  • 2 in conversation