BookmarkSubscribeRSS Feed
mst
Calcite | Level 5 mst
Calcite | Level 5

Hello all,

I am new to this model and trying to get the best model for my data. Please help me with the Proc GEE options.

Outcome:  lab measurement values (normal(0), low(2), high(3)) are available on multiple lab dates for each patient. These dates are not evenly spaced for every subject (like 3,6,12, months etc.,) and the number of measurements may differ for each subject.

Exposure: use of medicine (1/0) available on each lab measurement date.

 

Time: I have created a variable time that is the cumulative time for each lab date from the baseline (grouped by the patient) using the "lag" function. Please let me know where I should include this variable time ? as a continuous covariate or as "within=time ". Below is the sample code . I really appreciate your help.

 

data med_lab;
input ID lab med time;
datalines;
1 0 0 0
1 1 0 2
1 1 1 3
2 2 1 0
2 3 0 5
2 1 0 8
2 3 0 10
2 1 0 12
;
run;

/*using time in the within = option*/

proc gee data=med_lab;
class ID med;
model lab=med/ dist=multinomial link=glogit;
repeated subject=ID / within=Time type=indep;
run;

 

/*Using time as a covariate*/

proc gee data=med_lab;
class ID med;
model lab=med time/ dist=multinomial link=glogit;
repeated subject=ID /type=indep;
run;

2 REPLIES 2
StatDave
SAS Super FREQ

First, consider whether your 3-level response is ordinal. Perhaps they are logically ordered low, normal, high. If so, then you could create a coded variable with 1=low, 2=normal, 3=high to use as your response variable. You could then account for the ordinality by specifying LINK=CUMLOGIT to fit a cumulative logit model. Regarding TIME: with the independence structure there is no need to specify the WITHIN= option to order the responses and if you have a large number of distinct times, doing so could cause the correlation matrix to be large and sparse. However, if you want to assess the effect of TIME, then you could include it as a predictor in your model.

mst
Calcite | Level 5 mst
Calcite | Level 5

Thank you so much for taking the time to answer my question. I appreciate it if you could help with one follow-up question. 

 

We would like to assess the association by comparing the normal vs. high and low lab values with the drug, as these could indicate different biological effects. Please let me know if I can still adjust the time( cumulative no.of days within each observation for each subject) as a predictor while considering independent structure with dist=multinomial, link=glogit options. I am also providing one of the SAS resources that I used for the same for the reference

 

https://documentation.sas.com/doc/en/statug/15.2/statug_gee_examples06.htm

 

 

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