Potvin – all effects fixed - SAS [Two-Stage / GS Designs]

posted by d_labes  – Berlin, Germany, 2012-10-29 10:57 (4620 d 00:24 ago) – Posting: # 9479
Views: 11,567

Dear Helmut!

Here the sasophylistic answer (to what question ever):

Used code:
title "Long form analysis after stage 2";
Proc GLM data=Potvin2_long;
  class treatment period subject sequence stage;

  model lnPK = treatment period(stage) sequence stage subject(stage*sequence)
               /ss3 CLParm alpha=0.0588; * =2*0.0294;
  * random serves only for correct tests for sequence stage;
  random stage sequence subject(sequence*stage) /test;
  estimate 'T-R' treatment -1 1;
  lsmeans treatment / stderr cl pdiff alpha=0.0588;
run; quit;


As we know meanwhile the random statement doesn't change the "all fixed effects" solution of Proc GLM.

Output (only interested parts):
...
                    Least Squares Means

                                                             H0:LSMean1=
                                  Standard    H0:LSMEAN=0      LSMean2
 treatment     lnPK LSMEAN           Error       Pr > |t|       Pr > |t|

 R              1.13343123      0.04840026         <.0001         0.8338
 T              1.14787011      0.04840026         <.0001


 treatment     lnPK LSMEAN     94.12% Confidence Limits

 R                1.133431        1.035392     1.231470
 T                1.147870        1.049831     1.245909


         Least Squares Means for Effect treatment

               Difference
                  Between     94.12% Confidence Limits
   i    j           Means     for LSMean(i)-LSMean(j)

   1    2       -0.014439       -0.151665     0.122787


         94.12% (1-2*alpha) CIs - backtransformed

                   point         lower         upper

              101.454363     88.445194    116.377016

Attention! Must had change the sign (swap upper, lower) in the log domain since R-T is calculated due to lexical order of treatments coded as R and T.

Remark for the nitpickers and silly-o-meter inventors:
Within SAS you must use the subject effect nested within sequence and stage, even if the subjects are coded unique. Otherwise you don't obtain a type III ANOVA and no LSMeans.

Regards,

Detlew

Complete thread:

UA Flag
Activity
 Admin contact
23,424 posts in 4,927 threads, 1,672 registered users;
30 visitors (0 registered, 30 guests [including 20 identified bots]).
Forum time: 12:22 CEST (Europe/Vienna)

Reach for the stars,
even if you have to stand on a cactus.    Susan Longacre

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5