library(caribouSim)
# T <- 10000
# n <- seq(.0001*T, .01*T, by = 10)
# iters <- 10
T <- 1000000
n <- seq(.00001*T, .001*T, by = 10)
iters <- 100
###################### phi = 0.2 ######################
results <- vector(mode = "list", length = length(n))
rejections <- matrix(nrow = length(n), ncol = 3)
for(i in seq(n)){
tmp <- iterate(iters = iters, T = T, n = n[i], phi = 0.2, r = .5, modelSim = "I")
print(tmp)
results[[i]] <- cbind(i, tmp$collars, tmp$abundance, tmp$p_values, tmp$rhat)
rejections[i,] <- tmp$reject_rate
}
write.csv(do.call(rbind, results), "simulations/results_phi2c.csv")
write.csv(rejections, "simulations/rejections_phi2c.csv")
rejections_phi2 <- read.csv("simulations/rejections_phi2c.csv")
jpeg("simulations/phi2.jpg")
plot_sim(dat = rejections_phi2) + ylim(0,1)
dev.off()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.