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

Dear all, I met a problem in the PROC GLIMMIX,

How can I estimate the RR ratio using PROC GLIMMIX with dist = poisson and link = log?

proc glimmix data=stroke EMPIRICAL;
class group enroll_order;
model Score = group / dist=poisson link=log SOLUTION;
random site/ subject= enroll_order;
run;

Also, when adding the EMPIRICAL, my computer memory was not sufficient,

I will be apropriate if I can get you help! Sincerely, Chagnwei.

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

If you apply the %NLmeans macro to the results from using a STORE statement (see this note https://support.sas.com/kb/62/362.html ), you should get the RR.

 

Also of interest is this note https://support.sas.com/kb/23/003.html , which includes the Zou et al. method you mentioned earlier in one of these threads.

 

SteveDenham

View solution in original post

7 REPLIES 7
SteveDenham
Jade | Level 19

In this case, you can probably get estimates if you specify 'site' in the CLASS statement.  The more I look at this, I really need an explanation of enroll_order and how it is coded. I don't think your RANDOM statement correctly models the design in your data, as I don't see how to include 'enroll_order' as a subject for each site.  Without more information, I suspect that there is a different enroll_order for each site, which would mean that the two variables are confounded.  Please include more information regarding the data structure, and also include any messages in the log that may be generated.

 

SteveDenham

Diels_O
Obsidian | Level 7
proc glimmix data=stroke EMPIRICAL;
   class group site enroll_order;
   model Score = group baseline_NIHSS baseline_ASPECTS onset_to_randomization / dist=binomia link=log SOLUTION;
   random site/ subject= enroll_order;
run;

the group refers to trt;

the enroll_order refers to ID of each individuals;

Also I have change the dist from dist = poisson to dist  = binomial;

How can I get the RR ratio?

SteveDenham
Jade | Level 19

If you apply the %NLmeans macro to the results from using a STORE statement (see this note https://support.sas.com/kb/62/362.html ), you should get the RR.

 

Also of interest is this note https://support.sas.com/kb/23/003.html , which includes the Zou et al. method you mentioned earlier in one of these threads.

 

SteveDenham

Diels_O
Obsidian | Level 7
Many thanks to you! Thank you Steve!
Diels_O
Obsidian | Level 7

Dear Steve, the enroll_order was not related to the sites;

beside, the Score was a binary variable

Diels_O_3-1662541606493.png

 

, and the reasult 

proc glimmix data=stroke EMPIRICAL;
   class site trt   enroll_order;
   model score = trt / dist=poisson link=log SOLUTION;
   store glim;
run;
proc plm restore = glim;
	lsmeans trt / ilink diff exp cl;
run;

It works.

But when try to add random effect, it shows insufficient memory

proc glimmix data=stroke EMPIRICAL;
   class site trt   enroll_order;
   model score = trt / dist=poisson link=log SOLUTION;
   random site/subject = enroll_order;
run;

Diels_O_1-1662541484844.png

 

Diels_O_2-1662541516970.png

 

 

 

SteveDenham
Jade | Level 19

I'll make two suggestions, but won't guarantee either will help.

 

First, since enroll_order is sequential, and there are 948 subjects, you might make things easier if you remove enroll_order from the CLASS statement.

 

Second, you have a multilevel design, where enroll_order characterizes the residual error, and site is a random effect.  To assist convergence, you might try:

 

proc glimmix data=stroke EMPIRICAL;
   class site trt   ;
   model score = trt / dist=poisson link=log SOLUTION;
   random intercept/subject = site;
run;

Hope this helps.

 

SteveDenham

 

Diels_O
Obsidian | Level 7

Thank you again Steve!

By reading other books, I write the following code:

ods trace on;
ods output diffs = out1;
proc glimmix data=stroke;
   class site trt   enroll_order;
   model score = trt/ dist=binomia link=log SOLUTION;
random intercept trt/subject = site;
lsmeans trt/diff CL;
run;

ods trace off;
proc print data = out1;run;

data exp1;
set out1;
rr = exp(estimate);
lowcl = exp(lower);
uppercl = exp(upper);
run;

Just one question, is the "random intercept trt/ subject = site" equal to "random intercept/subject = site"? This two run out the same result.

Sincerely, Diels 

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
  • 7 replies
  • 1104 views
  • 4 likes
  • 2 in conversation