平滑颠簸的电源功能

时间:2015-09-30 20:35:11

标签: r graph plot bioinformatics

library(SKAT)
data(SKAT.haplotypes)
attach(SKAT.haplotypes)
set.seed(3)


power_fun_6 = function(MAF){
  power = Power_Logistic(Haplotype, SNPInfo$CHROM_POS, SubRegion.Length = 5000,
                         alpha = c(0.05), N.Sample.ALL = c(1000, 4000), OR.Type = "Fixed",
                         Causal.Percent = MAF, N.Sim = 50, MaxOR = 6, Negative.Percent = 0)  
}


OR6 = sapply(seq(1, 5, by = 0.25), power_fun_6)
y6.1000 = sapply(c(1:17), function(i) OR6[[i]][[1]])
x = seq(1, 5, 0.25)
d6.1000 = data.frame(x, y = y6.1000)
x6.1000 = d6.1000$x
y6.1000 = d6.1000$y
plot(x = x6.1000, y = y6.1000, xlab = "MAF", ylab = "Power")

enter image description here

我使用SKAT包计算序列关联研究的能力。我的Causal.Percent范围从1到5,我的直觉告诉我,等位基因越常见(因果百分比越高),功效越高。但是,当我绘制数据时,功率曲线非常颠簸。我正在设想一条平滑,单调增加的曲线。功率曲线会像这样颠簸吗?如果是这样,我该如何解决它?

0 个答案:

没有答案