From b0fc82cfd6ae42471610dc5d2c36277c82a818f8 Mon Sep 17 00:00:00 2001 From: Margarete Walden <maw32@humboldt.edu> Date: Sat, 11 May 2024 12:23:48 -0700 Subject: [PATCH] Replace sim_run.R due to unknown error. Set to nset 150, eff .1, nsim 100. --- chin_sim_image/scripts/sim_run.R | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/chin_sim_image/scripts/sim_run.R b/chin_sim_image/scripts/sim_run.R index 3a0cab0..ad00b01 100644 --- a/chin_sim_image/scripts/sim_run.R +++ b/chin_sim_image/scripts/sim_run.R @@ -103,11 +103,11 @@ source("scripts/sim_variables.R") # Tuning matrix sim_tunemat <- read.csv("data/sim_tunemat.csv", header=TRUE) -summary(sim_tunemat) +# summary(sim_tunemat) # Dataset seeds sim_datamat <- read.csv("data/sim_datamat.csv", header=TRUE) -summary(sim_datamat) +# summary(sim_datamat) #### ####----5. SIMULATION FOR-LOOP----------------------------------------------#### @@ -116,17 +116,18 @@ summary(sim_datamat) ## For each N, run model for each simulated dataset and store ## parameter estimates -xtracores <- 16 +xtracores <- 25 # xtracores <- 3 nimblecores <- 9 -# nimblecores <- 3 +# nimblecores <- 2 nimblechains <- 9 # nimblechains <- 2 nset <- 150 nsim <- 100 +theseefficiencies <- "Max efficiency 0.1" arrResults <- array(data=NA, dim=c(length(nset)*2, nsim, 7, 300)) @@ -184,11 +185,11 @@ print(Sys.time()) thiscounter <- 0 # i <- 200 -# i <- 150 +# i <- 100 # nset <- 200 for (i in nset) { - theseefficiencies <- "Max efficiency 0.25" + # theseefficiencies <- "Max efficiency 0.1" # thisefficiency <- "Max efficiency 0.1" for (thisefficiency in theseefficiencies) { @@ -1225,9 +1226,9 @@ for (i in nset) { ##----Save simulation results/print to console - if(j %% 50 == 0) { + if(j %% 5 == 0) { - filename <- paste0('output/R_ss',i, '_', theseefficiencies ,'_',j,'.RData', collapse='') + filename <- paste0('output/R_ss',thiscounter,'_',j,'.RData', collapse='') save(arrResults, file=filename) } thisstring <- paste0("Completed one simulation: Sample size: ", i, @@ -1249,6 +1250,6 @@ print(Sys.time()) ##----6. Save output---- ## Save output array -thisstring <- paste0('output/R_nsim_', nsim, '_nset_', nset, '_', theseefficiencies ,'.RData', collapse='') +thisstring <- paste0('output/R_nsim_', nsim, '_nset_', nset, thisefficiency, '.RData', collapse='') save(arrResults, file=thisstring) # sessionInfo() -- GitLab