# NOT RUN {
database <- matrix(c(1, 1, 2, 2, 1, 3), 3, 2)
haplotype <- c(1, 1)
# coalmatchprob:
coalmp <- coalmatchprob(database, haplotype,
reps = 1000, burnin = 0, treebetN = 10, Nbetsamp = 10,
muprior = c("normal(0.003, 0.001)", "normal(0.005, 0.001)"),
Nprior = "lognormal(9, 1)",
alphaprior = NULL,
progress = TRUE, trace = FALSE)
coalmp
murange <- range(c(coalmp$result$mu1, coalmp$result$mu2))
par(mfrow = c(2, 2))
plot(coalmp)
plot(coalmp$result$N, type = "l", ylab = "N")
plot(coalmp$result$mu1, type = "l", col = "red", ylim = murange, ylab = "mu")
points(coalmp$result$mu2, type = "l", col = "blue")
hist(coalmp$result$mu1, col = "#FF000066",
xlim = murange, ylim = c(0, 250), main = NULL, xlab = "mu")
hist(coalmp$result$mu2, add = TRUE, col = "#0000FF66")
par(mfrow = c(1, 1))
# batwing:
bw <- batwing(database,
reps = 10000, burnin = 1000, treebetN = 10, Nbetsamp = 10,
muprior = "normal(0.003, 0.001)",
Nprior = "lognormal(9, 1)",
alphaprior = NULL,
progress = TRUE, trace = FALSE)
bw
# }
Run the code above in your browser using DataLab