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 -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -