[R] Cross-over Data with Kenward-Roger correction
knouri
nouri4 at yahoo.com
Sun Jun 7 05:25:42 CEST 2015
Dear all:for the folowing data, a two-period, two treatment (A=1 vs. B=2) cross-over is fitted
using the folowing SAS code.
data one;
input Sbj Seq Per Trt PEF;
cards;
1 1 1 1 310
1 1 2 2 270
4 1 1 1 310
4 1 2 2 260
6 1 1 1 370
6 1 2 2 300
7 1 1 1 410
7 1 2 2 390
10 1 1 1 250
10 1 2 2 210
11 1 1 1 380
11 1 2 2 350
14 1 1 1 330
14 1 2 2 365
2 2 1 2 370
2 2 2 1 385
3 2 1 2 310
3 2 2 1 400
5 2 1 2 380
5 2 2 1 410
9 2 1 2 290
9 2 2 1 320
12 2 1 2 260
12 2 2 1 340
13 2 1 2 90
13 2 2 1 220
;
run;
proc mixed data=one method=reml;
class Sbj Per Trt;
model PEF = Per Trt /ddfm=kr;
repeated Trt / sub=Sbj type=un r;
lsmeans Trt / cl alpha=0.05;
estimate 'B vs. A' Trt -1 1 / alpha=0.1 cl;
run;
(where kr option is for Kenward-Roger method).I need to use R to reproduce the results similar to what the above SAS code generates.
I have used several R functions including lme, lmer with no success so far.Any advice will be greatly appreciated,Sincerely,
Keramat
[[alternative HTML version deleted]]
More information about the R-help
mailing list