************************************************************************* * This is an example of an analysis of the data from a 2x2 crossover * * using SAS. The example is taken from Example 3.1 of * * Senn, S. (1993). Cross-over Trials in Clinical Research. * * Chichester, England: John Wiley & Sons. * * * * The data set consists of 13 children enrolled in a trial to * * investigate the effects of two bronchodilators in the treatment of * * asthma. The outcome variable is peak expiratory flow rate (liters * * per minute) and was measured eight hours after treatment. There was * * a one-day washout period between treatment periods. * *************************************************************************; proc format; value trtfmt 1='Salbutamol' 2='Formoterol'; run; data senn; input patient sequence $ salbutamol formoterol; cards; 01 FS 270 310 02 SF 370 385 03 SF 310 400 04 FS 260 310 05 SF 380 410 06 FS 300 370 07 FS 390 410 09 SF 290 320 10 FS 210 250 11 FS 350 380 12 SF 260 340 13 SF 90 220 14 FS 365 330 ; run; proc print data=senn; title 'Formoterol vs. Salbutamol in the 2x2 Crossover Trial'; run; ************************************************************************* * Construct the intra-subject differences (times one-half) within each * * sequence. Then perform the statistical analysis. * *************************************************************************; data diff; set senn; if sequence='FS' then diff=0.5*(formoterol-salbutamol); if sequence='SF' then diff=0.5*(salbutamol-formoterol); run; proc sort data=diff; by sequence; run; proc univariate data=diff normal plot; by sequence; var diff; title2 'Descriptive Statistics and Graphics for Treatment Difference'; run; proc ttest data=diff; class sequence; var diff; title2 'Parametric Analysis'; run; proc npar1way data=diff wilcoxon; class sequence; var diff; title2 'Nonparametric Analysis'; run;