Paired t-test
data pressure; input SBPbefore SBPafter @@; datalines; 120 128 124 131 130 131 118 127 140 132 128 125 140 141 135 137 126 118 130 132 126 129 127 135 ; run;
ods graphics on; proc ttest; paired SBPbefore*SBPafter; run;
ods graphics off;
Paired t-test using PROC MIXED procedure
proc mixed method=type3;
class pt paired;
model y = paired / ddfm=kenwardroger;
random pt;
lsmean paired / tdiff cl;
run;
data conc2a conc2b; set conc2 ;
if (order1 = 2 or order1 =3) ;
if trt = "R" then output conc2a;
if trt = "T" then output conc2b ;
run ;
%macro ttest(aaa);
proc mixed data = conc2&aaa method=type3;
class subject order1 ;
model conc = order1 / ddfm=kenwardroger;
random subject ;
lsmean order1/ tdiff cl;
run;
%mend ;
%ttest(a);
%ttest(b);
Unpaired t-test
proc ttest data = mainlib.file1; var _numeric_; class buy_ind; run;
'통계 clinical trial > SAS' 카테고리의 다른 글
SAS Procedure 들 (0) | 2019.03.03 |
---|---|
Call R Graphics from PROC IML (R graph 부르기) (0) | 2019.02.14 |
MACRO 사용하기 (0) | 2018.11.28 |
proc FORMAT (0) | 2018.11.28 |
ODS 특수문자 입력 (ODS escapechar) (0) | 2018.11.26 |