ペアt検定を使用した3つの実験の測定値を比較しています。ペアt検定ではNAの結果は得られません
dat <- read.table(text='sample G1 G2 G3
S1 0.002458717 0.01045769 0.003770503
S2 0.010009784 0.02465088 0.011505804
S3 NA NA 0.006403423
S1 0.003458717 0.01145769 0.004770503
S2 0.011009784 0.02565088 0.012505804
S3 NA NA 0.007403423
S1 0.001458717 0.00945769 0.002770503
S2 0.009009784 0.02365088 0.010505804
S3 NA NA 0.0054034232', header=TRUE)
注G1/2/3が独立した測定ではなく、試験された異なる遺伝子を表している:いくつかの値が(あるNA
)
データが欠落している場合 しかし、私は結果を取得していない午前。彼らは関連しておらず、それぞれのGは自分自身のために必要です。
t.test:
sig<-lapply(dat[-1], function(x)
pairwise.t.test(x, dat$sample,
p.adjust.method = "BH"))
> sig
$G1
Pairwise comparisons using t tests with pooled SD
data: x and dat$sample
S1 S2
S2 - -
S3 - -
P value adjustment method: BH
$G2
Pairwise comparisons using t tests with pooled SD
data: x and dat$sample
S1 S2
S2 - -
S3 - -
P value adjustment method: BH
$G3
Pairwise comparisons using t tests with pooled SD
data: x and dat$sample
S1 S2
S2 0.00024 -
S3 0.01803 0.00117
P value adjustment method: BH
値が欠落しているようにG1/2用のS1/2とS3の間には比較は、存在しない理由を私は理解しています。しかし、S1とS2を比較した結果がないのはなぜですか?
ありがとうございました!
NAを削除できますか? pairwise.t.test(tmp [、2]、tmp $ sample) } lapply(2:4、function(x){ tmp < - na.omit(dat [、c(1、x)]) ) ' – Jimbou
p値を得るには、グループごとに少なくとも2回の観察が必要です。あなたの例では、G1とG2のS3が完全に欠落しています。したがって、観測値<2。 – Jimbou
で要因レベルを削除してください。私は少なくとも2つの虐殺が必要であることを知っています。そのため、1つのグループがNAを持つグループ間の比較のためのp値は得られませんが、これは問題ではありません。しかし、3つの観測値を持つグループ(S1対S2)を比較しても、p値は得られません。私はNAs –