BookmarkSubscribeRSS Feed
juliajulia
Obsidian | Level 7

hello, I have a 4 years longitudinal data set from 2013 to 2016. the VL_status is patients viral load status with three level response (never suppressed, durable suppressed, and intermittent suppressed). I want to analyze the data using proc glimmix because it can give me the adjusted percentage for each group. here is the code I used but I got an error message. could anybody tell me if the code I used is correct for the longitudinal study or not and what I have missed here.

 

153 /*******calculate the adjusted percent *********/

154 proc glimmix data=out2.Client_VL_Euci44_f;

155 class euci44 year raceeth;

156 model vl_status =year raceeth

157 /solution dist=binomial link=logit;

158 lsmeans raceeth/om ilink;

159 format vl_status vlstatusfmt. gender genderfmt. raceeth raceethfmt.;

160 run;

 

 

 

WARNING: Class levels for EUCI44 are not printed because of excessive size.

NOTE: Some observations are not used in the analysis because of: missing fixed

effects (n=6258).

NOTE: Convergence criterion (GCONV=1E-8) satisfied.

NOTE: At least one element of the gradient is greater than 1e-3.

NOTE: PROCEDURE GLIMMIX used (Total process time):

real time 37.53 seconds

cpu time 37.70 seconds

3 REPLIES 3
Haris
Lapis Lazuli | Level 10

First, your output is not BINOMIAL but rather MULTINOMIAL.

Second, you do not have any r-side effects to account for repeated measures. Your code should look something like this:

proc glimmix data=out2.Client_VL_Euci44_f;
  class <SubjectID> euci44 year raceeth;
  model vl_status =year raceeth /solution dist=multinomial link=logit;
  random Year / sub=<SubjectID> _residual_ type=ar(1);
  lsmeans raceeth / om ilink;
  format vl_status vlstatusfmt. gender genderfmt. raceeth raceethfmt.;
run;
juliajulia
Obsidian | Level 7

Thanks Haris.

I run the code but it says the  lsmeans is not an option for multinomial outcome. and the link has to choose from glogit and clogit. do you know are there any way to get the % and adjusted percentage?

proc glimmix data=out2.Client_VL_Euci44_f;

class euci44 year raceeth;

model vl_status =year raceeth /solution dist=multinomial link=glogit;

random Year / sub=euci44 type=ar(1) group=vl_status;

/* lsmeans raceeth / om ilink;*/

format vl_status vlstatusfmt. gender genderfmt. raceeth raceethfmt.;

run;

Haris
Lapis Lazuli | Level 10
Unfortunately I have not used MULTINOMIAL regression since school. (LS)ESTIMATE statement should let you calculate whatever you need out of the model.
Good luck!

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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