#In principle, you only need to install the EpiSim package once unless you install a new version or install on another computer. #Install from a GitHub repo #If devtools package is installed, it allows users to download and install Episim package directly from GitHub. devtools::install_github("https://github.com/statcan/episim", upgrade = "never") library(EpiSim) #Set path to model Excel workbook file.name <- "your path/Example2.xls" #Set path to model Excel workbook. Always use forward slashes. #Define sheet names. They must exist in the Excel workbook. sheet.names = list( initial.conditions = "Initial conditions", parms.notime.0d = "Parameters any time any age", parms.0d = "Parameters any age", parms.1d = "Parameters by Age", parms.2d = "Parameters by Age x Age", model.flow ="Model Specs", auxiliary.vars = "Intermediate calculations", post.processing = "Post Processing" ) results.baseline <- seir.n.age.classes(file.name,sheet.names) hypercube.specs <- read.hypercube.sampling.specs(file.name, sheet = "HyperCube Sampling Specs") parm.cloud.grid.specs <- list( hypercube.lower.bounds = hypercube.specs$lower.bound, hypercube.upper.bounds = hypercube.specs$upper.bound, hypercube.apex.mode = hypercube.specs$apex , # To be commented if uniform n.repeat.within.hypercube = 2, # 10000 LatinHypercubeSampling = c(FALSE, TRUE)[2], racine = 98 , #this is a seed for the pseudo random process backend.transformation = function(x) {x}, # Need to provide a function like exp here reference.alteration = c("overwrite", "add", "multiply")[1], tmin.alter.scope = 0:1000 ) various.parms.result = try.various.parms.values(results.baseline, parm.cloud.grid.specs) various.parms.result$df.sweep$which.sim = cumsum(various.parms.result$df.sweep$time ==0) # write sweep file and outcome summary to csv write.csv(various.parms.result$df.sweep, file = "sweep_file.csv") write.csv(various.parms.result$outcomes.summary.df, file = "summary.csv") # show EpiSim and R version (among other things) print(sessionInfo(),locale=FALSE) # show R versions and versions of packages