对于这个数据集,来自基线的值:t3是肿瘤大小,我想看一个受试者的肿瘤大小变化与PCR值之间的关系(PCR = 0表示仍有活跃的癌细胞,PCR = 1意味着癌细胞消失了。
基本上我想看看肿瘤大小变化与PCR值之间是否存在任何相关性。
感谢您的帮助!
SUBJECTID Baseline t1 t2 t3 PCR
1001 88 78 30 14 0
1002 29 26 66 16 0
1003 50 64 54 46 0
1004 91 90 99 43 0
1005 98 109 60 42 0
1007 100 100 54 0
1008 45 49 47 32 0
1009 75 66 57 7 0
1010 60 52 20 3 1
1011 68 68 56 47 1
1012 78 84 56 57 0
1013 71 70 8 5 0
1015 79 50 11 3 1
1016 73 60 57 36 0
1017 54 27 16 0
1018 50 37 33 26 0
1019 115 68 33 67 0
1021 63 55 0 0 1
1022 98 91 76 75 0
1024 76 76 0 0
1025 47 45 42 42
1026 32 25 14 0 1
1027 40 37 65 0
1028 60 110 110 0 0
答案 0 :(得分:0)
似乎t检验就足够了。由于数据不规范,需要多次输入数据:
dput(dfrm)
structure(list(SUBJECTID = c(1001L, 1002L, 1003L, 1004L, 1005L,
1007L, 1008L, 1009L, 1010L, 1011L, 1012L, 1013L, 1015L, 1016L,
1017L, 1018L, 1019L, 1021L, 1022L, 1024L, 1025L, 1026L, 1027L,
1028L), Baseline = c(88L, 29L, 50L, 91L, 98L, 100L, 45L, 75L,
60L, 68L, 78L, 71L, 79L, 73L, 54L, 50L, 115L, 63L, 98L, 76L,
47L, 32L, 40L, 60L), t1 = c(78L, 26L, 64L, 90L, 109L, 100L, 49L,
66L, 52L, 68L, 84L, 70L, 50L, 60L, 27L, 37L, 68L, 55L, 91L, 76L,
45L, 25L, 37L, 110L), t2 = c(30L, 66L, 54L, 99L, 60L, NA, 47L,
57L, 20L, 56L, 56L, 8L, 11L, 57L, 16L, 33L, 33L, 0L, 76L, 76L,
42L, 14L, 65L, 110L), t3 = c(14L, 16L, 46L, 43L, 42L, 54L, 32L,
7L, 3L, 47L, 57L, 5L, 3L, 36L, NA, 26L, 67L, 0L, 75L, 0L, 42L,
0L, NA, 0L), PCR = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 1L,
0L, 0L, 1L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 1L, 0L, 0L)), .Names = c("SUBJECTID",
"Baseline", "t1", "t2", "t3", "PCR"), class = "data.frame", row.names = c(NA,
-24L))
> t.test(dfrm$t3[dfrm$PCR==0], dfrm$t3[dfrm$PCR==1] )
Welch Two Sample t-test
data: dfrm$t3[dfrm$PCR == 0] and dfrm$t3[dfrm$PCR == 1]
t = 2.0916, df = 7.3971, p-value = 0.07267
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-2.658325 47.575972
sample estimates:
mean of x mean of y
33.05882 10.60000
它不是真正的"相关性"而是通过PCR定义的两组中平均大小的两组比较。