-
Notifications
You must be signed in to change notification settings - Fork 0
/
Additional file 9.R
73 lines (62 loc) · 1.69 KB
/
Additional file 9.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
library("lmerTest")
u=read.csv("Data/Prog longitudinal data.csv")
u1=u
u1[,"CST"]=as.numeric(u1[,"CST"]=="I")
ll=lmer(CST~1+
Timepoint..weeks.+(0+Timepoint..weeks.|Patient.number)+
treatment+
BMI+
Age+
Cohort+
(1|Patient.number)+
(1|Ethnicity),u1)
a=anova(ll)
u2=u
u2[,"CST"]=as.numeric(u2[,"CST"]=="II")
ll=lmer(CST~0+
Timepoint..weeks.+(0+Timepoint..weeks.|Patient.number)+
treatment+
BMI+
Age+
Cohort+
(1|Patient.number)+
(1|Ethnicity),u2)
b=anova(ll)
u3=u
u3[,"CST"]=as.numeric(u3[,"CST"]=="III")
ll=lmer(CST~1+
Timepoint..weeks.+(0+Timepoint..weeks.|Patient.number)+
treatment+
BMI+
Age+
Cohort+
(1|Patient.number)+
(1|Ethnicity),u3)
c=anova(ll)
u4=u
u4[,"CST"]=as.numeric(u4[,"CST"]=="IV")
ll=lmer(CST~1+
Timepoint..weeks.+(0+Timepoint..weeks.|Patient.number)+
treatment+
BMI+
Age+
Cohort+
(1|Patient.number)+
(1|Ethnicity),u4)
d=anova(ll)
u5=u
u5[,"CST"]=as.numeric(u5[,"CST"]=="V")
ll=lmer(CST~1+
Timepoint..weeks.+(0+Timepoint..weeks.|Patient.number)+
treatment+
BMI+
Age+
Cohort+
(1|Patient.number)+
(1|Ethnicity),u5)
e=anova(ll)
tt=rbind(a["treatment",],b["treatment",],c["treatment",],d["treatment",],e["treatment",])
fdr=p.adjust(tt[,6])
tt=cbind(tt,fdr)
rownames(tt)=c("CSTI","CSTII","CSTIII","CSTIV","CSTV")
tt