diff --git a/Projects/Agora/parameters_agora.R b/Projects/Agora/parameters_agora.R index dc5ff75509057e3f92532e972e1319781c746c35..230833d21b044e24ce134a22f1d588e39802c0ee 100644 --- a/Projects/Agora/parameters_agora.R +++ b/Projects/Agora/parameters_agora.R @@ -3,22 +3,27 @@ designpath<- "Projects/Agora/Designs/" resps =360 # number of respondents -nosim=1000 # number of simulations to run (about 500 is minimum) +nosim=2 # number of simulations to run (about 500 is minimum) #betacoefficients should not include "-" -#basc = -1.2 -#basc2 = -1.4 -#baction = 0.1 -#badvisory = 0.4 -#bpartner = 0.3 -#bcomp = 0.02 - -basc = -2.2 -basc2 = -2.7 -baction = -0.15 -badvisory = 0.26 -bpartner = -0.09 -bcomp = 0.004 + +#design priors parameters +basc = -1.2 +basc2 = -1.4 +baction = 0.1 +badvisory = 0.4 +bpartner = 0.3 +bcomp = 0.02 + + +# from survey + +# basc = -2.2 +# basc2 = -2.7 +# baction = -0.15 +# badvisory = 0.26 +# bpartner = -0.09 +# bcomp = 0.004 diff --git a/generatemd.R b/generatemd.R index 1381851f8b7a0efea6bad2ed36073cf08e379a13..8fa2e7b2c9fd3f0ac0dcc38e4902d8a9c912a3f9 100644 --- a/generatemd.R +++ b/generatemd.R @@ -2,12 +2,12 @@ rm(list=ls()) #file <- "Projects/ValuGaps/parameters_valugaps.R" - file <- "Projects/Agora/parameters_agora.R" + file <- "Projects/SE_DRIVE/parameters_SE_DRIVE.R" rmarkdown::render("simulation_output.rmd", output_file = paste0(stringr::str_remove_all(file, - "parameters_|.R$"),"reecap.html"), + "parameters_|.R$"),".html"), params = list(file=file) ) diff --git a/simulation_output.rmd b/simulation_output.rmd index a4177389ca76ba1a2d4329e5f3ebe64032c523d9..e5cc92bda0929caf761c1e8459525d11c7077e28 100644 --- a/simulation_output.rmd +++ b/simulation_output.rmd @@ -36,6 +36,8 @@ print(combined_vector) The simulation has `r resps` respondents and `r nosim` runs. +The total time for estimation is `r all_designs[["time"]]`. + the parameters used for the simulation are: ```{r, echo=FALSE} diff --git a/simulationcore_purrr.R b/simulationcore_purrr.R index 345b6011573bcd9175326a9a973baac74c743a60..465189bfc6ccdac084adc8c6c524caf6cc284b69 100644 --- a/simulationcore_purrr.R +++ b/simulationcore_purrr.R @@ -34,7 +34,7 @@ time <- tictoc::toc() print(time) - +all_designs[["time"]]=time powa <- map(all_designs, ~ .x$power)