Giter VIP home page Giter VIP logo

wfm-1l-diffusapprox-pmmh's People

Contributors

zhangyi-he avatar

Stargazers

 avatar

Watchers

 avatar

wfm-1l-diffusapprox-pmmh's Issues

cannot repeat your result

Dear Authors

Thankyou so much for your great software, it's very useful for selection coefficients. I use your code and data to estimate s, and I can repeat your result of MC1R and ASIP, while KIT13 and TRPM1 is quite different from your paper in MBE. Even I start with h=0, 0.5 and 1, could you please help me fix it or modify a few parameters.

https://drive.google.com/drive/folders/1QOKwNFCd10Eh0vaUZqF635TNECn6Jwb2?usp=sharing

code:
#' Raw data of Wutke et al. (2016) from 14500 BC
load("./Data/REAL.rda")

set.seed(1)
raw_smp <- TRPM1
raw_smp <- raw_smp[which(rowSums(raw_smp[, 4:9]) != 0), ]
int_gen <- -round(max(raw_smp$age_mean, raw_smp$age_lower, raw_smp$age_upper) / 8)
lst_gen <- -round(min(raw_smp$age_mean, raw_smp$age_lower, raw_smp$age_upper) / 8)
raw_smp <- raw_smp[which(raw_smp$age_mean <= max(raw_smp$age_mean[which(rowSums(raw_smp[, c(5, 6, 8)]) != 0)])), ]
max(raw_smp$age_mean) - 2000
raw_smp$age_mean <- -round(raw_smp$age_mean / 8)
raw_smp$age_lower <- -round(raw_smp$age_lower / 8)
raw_smp$age_upper <- -round(raw_smp$age_upper / 8)

raw_smp[which(raw_smp[, 7] == 1), 4:5] <- 1 / 2

raw_smp[which(raw_smp[, 8] == 1), 5:6] <- 1 / 2

raw_smp[which(raw_smp[, 9] == 1), 4:6] <- 1 / 3

raw_smp[which(raw_smp[, 7] == 1), 4] <- 1 / 2
raw_smp[which(raw_smp[, 7] == 1), 5] <- 1 / 2
raw_smp[which(raw_smp[, 8] == 1), 5] <- 1 / 2
raw_smp[which(raw_smp[, 8] == 1), 6] <- 1 / 2
raw_smp[which(raw_smp[, 9] == 1), 4] <- 1 / 4
raw_smp[which(raw_smp[, 9] == 1), 5] <- 1 / 2
raw_smp[which(raw_smp[, 9] == 1), 6] <- 1 / 4
raw_smp <- raw_smp[order(raw_smp$age_mean), ]
raw_smp <- raw_smp[, -c(2, 3, 7, 8, 9)]

sel_cof <- c(0e+00, 0e+00)
dom_par <- 5e-01
pop_siz <- pop_siz[min(raw_smp$age_mean - int_gen + 1):max(raw_smp$age_mean - int_gen + 1)]
ref_siz <- tail(pop_siz, n = 1)
evt_gen <- round((-3500 - 2000) / 8) # 3500 BC (domestication)
raw_smp
ptn_num <- 5e+00
pcl_num <- 1e+03
itn_num <- 2e+04
stp_siz <- (1:itn_num)^(-2 / 3)
apt_rto <- 4e-01

system.time(PMMH <- cmprunAdaptPMMH(sel_cof, dom_par, pop_siz, ref_siz, evt_gen, raw_smp, ptn_num, pcl_num, itn_num, stp_siz, apt_rto))

save(sel_cof, dom_par, pop_siz, ref_siz, evt_gen, raw_smp, ptn_num, pcl_num, itn_num, stp_siz, apt_rto, PMMH,
file = "./REAL_PTN_TRPM1_1.rda")

Thankyou!

Pan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.