jag009
★★★

NJ,
2013-08-01 23:08
(4280 d 20:16 ago)

Posting: # 11154
Views: 11,591
 

 SAS: Dropping a treatment from a 3-way study [Software]

Hi all, especially Detlew :-)

Do I need to do anything out of the ordinary in SAS to analyze a 3 treatment study dataset having one of the treatment arms removed?

I use PROC GLM to analyze a BE dataset from a 3-period, 3-treatment, 6 sequence crossover study. For some reason when I removed the data from one treatment arm (I just put "." for the data, leaving the "subject, period, treatment, sequence" info intact), SAS failed to generate results for T/R Ratio, 90% CI for the treatment that I kept.

SAS errror message (with respect to PROC GLM):
NOTE: TYPE I EMS not available without the E1 option.
WARNING: More coefficients than levels specified for effect TREATMENT. Some coefficients will be ignored.
NOTE: Test2 - Reference is not estimable.
NOTE: The data set WORK.L_S_MEANS has 5 observations and 9 variables.

WARNING: Output 'Estimates' was not created. Make sure that the output object name, label, or path is spelled correctly. Also, verify that the appropriate procedure options are used to produce the requested output object. For example, verify that the NOPRINT option is not used.


My SAS code:

PROC GLM data=&glmdata order=internal outstat=tanova;
  CLASS TREATMENT PERIOD SEQUENCE SUBJECT;
  MODEL &pk= SEQUENCE SUBJECT(SEQUENCE) PERIOD TREATMENT/SS1 SS3 CLPARM alpha=0.1;
  output out=pred p=yhat r=resid student=stresid;
  RANDOM SUBJECT(SEQUENCE) /TEST;
  LSMEANS TREATMENT PERIOD /stderr pdiff out=lsmeanl;
  estimat = ESTIMATE "Test2 - Reference" TREATMENT 0 1 -1;
run;


Thanks
John
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2013-08-02 00:17
(4280 d 19:07 ago)

@ jag009
Posting: # 11155
Views: 10,003
 

 Delete instead of missing?

Hi John,

I don’t speak SAS, but until Detlew shows up you can try something: Instead of setting Test1’s observations to “.”, delete the respective rows completely.
Try in the last line to delete 0 from the ESTIMATE statement.


Edit: PHX seems to be more tolerant. Same results whether I exclude one treatment (my standard), set them to “.”, or delete complete rows. In the second case it doesn’t matter whether I set one of the coefficients to 0 or leave it empty. Now for the interesting part: One of my studies, n=18, 6×3, all effects fixed.

Full model (df 30)
       PE      90% CI    ISCV   MSE
T1/R  98.91 94.73 103.27 7.42 0.005485
T2/R 101.59 97.29 106.07 7.42 0.005485


Crippled models (df 14 each)
       PE      90% CI    ISCV   MSE
T1/R  99.00 93.64 104.66 9.19 0.008413
T2/R 101.52 98.15 105.02 5.53 0.003108


CIs in the crippled models are wider or narrower due to the different pooled variances and dfs. The PEs are also slightly different (closer to 1), which was a little bit surprising to me.
:confused:

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
d_labes
★★★

Berlin, Germany,
2013-08-02 11:06
(4280 d 08:18 ago)

@ jag009
Posting: # 11165
Views: 9,909
 

 SAS: Dropping a treatment from a 3-way study

Hi John!

Full ACK with Helmut's suggestion. Seems he has basic SAS speak knowledge acquired :cool:.
If you set the values of one treatment just to missing SAS nevertheless tries to estimate the treatment effect for it with is of course missing. Result: Errors.

Also full ACK with the estimate statement. After removing one treatment it has only two entries.

BTW: Be careful with this estimate. The factors +1, -1 and zero depend on the coding of our treatment factor. It's lexicographic. T1, T2 come after R if you have coded as usual T1, T2, R.

Regards,

Detlew
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2013-08-02 19:23
(4280 d 00:00 ago)

@ d_labes
Posting: # 11173
Views: 9,824
 

 SAS: Dropping a treatment from a 3-way study

Hi Detlew!

❝ Full ACK with Helmut's suggestion. Seems he has basic SAS speak knowledge acquired :cool:.


Just following simple analogies of the type: “Since I’m fluent in BASIC, I can dabble in FORTRAN.” ;-)

Any opinion on the different PEs I observed in my example?

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
jag009
★★★

NJ,
2013-08-02 19:38
(4279 d 23:46 ago)

@ d_labes
Posting: # 11175
Views: 9,813
 

 SAS: Dropping a treatment from a 3-way study

Thanks guys! I should've thought of that.

John
BRN
☆    

Turkey,
2015-07-15 19:00
(3568 d 00:24 ago)

@ d_labes
Posting: # 15089
Views: 8,513
 

 SAS: Dropping a treatment from a 3-way study

Hi Detlew,


❝ BTW: Be careful with this estimate. The factors +1, -1 and zero depend on the coding of our treatment factor. It's lexicographic. T1, T2 come after R if you have coded as usual T1, T2, R.


How should we write the sas code for the estimate to compare
- T vs. R
- T vs. R1

in a 4 sequence study (R1TR2R R2RR1T RR1TR2 TR2RR1)?

Thanks.

Regards,
BRN
d_labes
★★★

Berlin, Germany,
2015-07-17 10:37
(3566 d 08:47 ago)

@ BRN
Posting: # 15101
Views: 8,440
 

 SAS: estimate statement in Proc GLM

Dear BRN;

❝ How should we write the sas code for the estimate to compare

❝ - T vs. R

❝ - T vs. R1


❝ in a 4 sequence study (R1TR2R R2RR1T RR1TR2 TR2RR1)?


That depends (as always in life :cool:).
If you evaluate all data at once it reads (lex order R, R1, R2, T):
estimate 'T vs. R' tmt -1 0 0 1;
estimate 'T vs. R1' tmt 0 -1 0 1;

If you evaluate according to the EMA crippled analysis you have to use only the data for the comparison under consideration, i.e. you have only T|R or T|R1 at hand. Then the estimate statement reads:
estimate 'T vs. R' tmt -1 1;
and in an other Proc GLM call
estimate 'T vs. R1' tmt -1 1;

Hope that helps.
BTW: Sometimes RTFM helps also :-D.

Regards,

Detlew
UA Flag
Activity
 Admin contact
23,424 posts in 4,927 threads, 1,670 registered users;
25 visitors (0 registered, 25 guests [including 10 identified bots]).
Forum time: 19:24 CEST (Europe/Vienna)

The combination of some data and an aching desire
for an answer does not ensure that a reasonable answer
can be extracted from a given body of data.    John W. Tukey

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