knitr::opts_chunk$set(echo = TRUE) ## Load packages library(devtools) library(dplyr) library(ggplot2) library(cowplot) library(latex2exp) library(coda) library(Rcpp) library(moiR) load_all('.')
testFITNESS()
Example of fitness calculation and update of only one SNP
X<-matrix(ncol=100,nrow=100,sample(c(-1,1), 100*100,replace=T)) X[1,]<- -1 X[1,1]<- 1 message("selection coefficients uniform" ) s = exp(rnorm(100,0,0.1)) - 1 w1<-Wgo(X,s,1) s2<-s s2[1]<-10 w2<-Wgo(X,s,s2,1,w1) w3=Wgo(X,s2,1) plot(s,s2) plot(w1,w2) plot(w2,w3)
Here all get updated at each iteration, in the MCMC one at a time
test_GPROPOSALR()
message("Uniform distribution") test_SPROPOSALR(1) message("lognormal distribution") test_SPROPOSALR(3)
y=test_PRIORR() qplot(y, xlab='likelihood')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.