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
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;
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;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.