turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- How Do I Combine Multiple Dose Groups to Compare A...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-28-2017 03:59 PM

Dear All,

Clinical trials designed with multiple doses and a placebo group sometimes want to have an estimate of the combined dose group effect compared against placebo at the specified endpoint (eg, Week 8). Essentially, I am wondering if it is better to pool the dose groups prior to running the model or if the dose groups should be pooled in the contrast statement itself. I have provided example code below. I cannot find documentation regarding what the difference is between the two methods and when it is appropriate to use either method. I am working in SAS v9.4.

```
data test;
call streaminit(33445);
do id=1 to 20;
rid=rand('normal');
trt=ceil(rand('uniform')*3);
if trt in (2,3) then trt2=2;
else trt2=trt;
do time=1 to 2;
y=trt + trt*time + rand('normal') + rid;
output;
end;
end;
run;
proc mixed data=test;
class id trt time;
model y=trt time trt*time / e;
repeated time / subject=id(trt) type=cs;
contrast 'placebo vs active at timepoint 2' trt -1 .5 .5 trt*time 0 -1 0 .5 0 .5;
estimate 'placebo vs active at timepoint 2' trt -1 .5 .5 trt*time 0 -1 0 .5 0 .5;
lsmeans trt*time / diff;
run;
proc mixed data=test;
class id trt2 time;
model y=trt2 time trt2*time;
repeated time / subject=id(trt2) type=cs;
lsmeans trt2*time / diff;
estimate 'placebo vs active at timepoint 2' trt2 -1 1 trt2*time 0 -1 0 1;
run;
```

Here are the results using trt in model:

Standard

Label Estimate Error DF t Value Pr > |t|

placebo vs active at timepoint 2 5.7302 0.7368 17 7.78 <.0001

Here are the results using trt2 in model:

Standard

Label Estimate Error DF t Value Pr > |t|

placebo vs active at timepoint 2 5.9023 1.2494 18 4.72 0.0002

Many thanks in advance!!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-01-2017 02:27 AM

A well-posed question

First, create a balanced data set so that you aren't trying to juggle the impacts of unbalanced data while you sort out syntax.

data newtest; call streaminit(33445); do id=1 to 10; rid=rand('normal'); *random effect for subject=id; do trt= 1 to 3; if trt in (2,3) then trt2=2; else trt2=trt; do time=1 to 2; y=trt + trt*time + rand('normal') + rid; output; end; end; end; run;

proc tabulate data=newtest;

class trt trt2;

table trt, trt2;

run;

Then run your two models. Note that the estimates of the difference now match, but SEs and DFs do not.

The fundamental difference in the two models lies in the REPEATED statement. The first model using

repeated time / subject=id(trt) type=cs;

identifies 30 subjects (10 IDs for each of 3 TRTs). But the REPEATED statement in the second model using

repeated time / subject=id(trt2) type=cs;

identifies only 20 subjects (10 IDs for each of 2 TRT2s). Consequently SEs and DFs differ.

If my experiment randomly assigned 3 treatments to 10 subjects per treatment so that I actually had 30 subjects in total, I would use the first model rather than the second because the first model preserves the experimental design; the second makes up a new one.