r - Smoothing a bumpy power function -


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, = 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

i'm using skat package calculate power of sequence association studies. causal.percent ranges 1 5, , intuition tells me me more common allele (higher causal percent), higher power. however, when plot data, power curve bumpy. envisioning smooth, monotonically increasing curve. can power curves bumpy this? if how can smooth out?


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

node.js - Express and Redis - If session exists for this user, don't allow access -

excel - I can't get the attachement of the email PHP -