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

I have a two group proportion test, measure is repeated 3 times in group 1 and group 2, here is the data for each measure.

data from first time point

data1;

input group response $ count;

datalines;

1 yes 27

1 no 32

0 yes 5

0 no 9

;

 

data from second time: 

data2;

input group response $ count;

datalines;

1 yes 26

1 no 33

0 yes 4

0 no 10

;

 

data from the third time:

data3;

input group response $ count;

datalines;

1 yes 25

1 no 34

0 yes 5

0 no 9

;

 

Is it possible to test the difference of the percentage of "yes" between group 1 and group 2 by combining all data from three separated measures together? If yes, how to do that? Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

I will assume that you have 59+14 = 63 subjects, and you have 3 repeated observations on each subject in each group. Visually, it does not appear from the cross-tabulations that the allocations of yes and no for each group change appreciably over time, and you might think that you could pool the data over time. But this approach would be incorrect because the pooled counts would not be independent: observations made on the same subject are correlated.

 

I would consider a GLMM (generalized linear mixed model) like

 

proc glimmix data=have method=laplace;
  class id group time;
  model outcome = group|time / dist=binary;
  random time / subject=id(group) type=ar(1);
run;

where id is subject identification and outcome is the binary response (yes or no) for an individual subject at a particular time. Note that the "have" dataset will one observation for each subject at each time, which is necessary to accommodate repeated measures on individual subjects; thus there will be 63 x 3 = 189 observations.

 

View solution in original post

7 REPLIES 7
sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

I would need more information about your study design.

 

Among other things, are the three observations at different times measured on the same experimental or sampling unit; in other words, is this a true repeated measures design, or something else? What is the experimental/sampling unit? What do you this is the replicate in your study?

 

If you provide more information about your study design, the Community will be better able to answer your question.

 

Jerrynetwork
Obsidian | Level 7

Yes, the observation is for the same subjects at different times, actually it is repeated monthly, two groups included, one has 59 subjects, the other 14. need to compared if there is difference about percentage of 'yes' between two groups. Thank you!

sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

I will assume that you have 59+14 = 63 subjects, and you have 3 repeated observations on each subject in each group. Visually, it does not appear from the cross-tabulations that the allocations of yes and no for each group change appreciably over time, and you might think that you could pool the data over time. But this approach would be incorrect because the pooled counts would not be independent: observations made on the same subject are correlated.

 

I would consider a GLMM (generalized linear mixed model) like

 

proc glimmix data=have method=laplace;
  class id group time;
  model outcome = group|time / dist=binary;
  random time / subject=id(group) type=ar(1);
run;

where id is subject identification and outcome is the binary response (yes or no) for an individual subject at a particular time. Note that the "have" dataset will one observation for each subject at each time, which is necessary to accommodate repeated measures on individual subjects; thus there will be 63 x 3 = 189 observations.

 

Jerrynetwork
Obsidian | Level 7

Thank you!

sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

You're welcome. Follow up as need be.

Jerrynetwork
Obsidian | Level 7

Hi. Sld, The purpose of this project is to look at if there is significant difference between group 1 and 2, but sample size is not big enough. Mixed effect analysis doesn't improve the analysis, either. Is there another way to combine multiple measure to increase the power for analysis? Thank you!

sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12
I do not think so.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 4250 views
  • 3 likes
  • 2 in conversation