Skip to content

Commit

Permalink
Adding alternate MCMC functions with provision for separate AF/SA rep…
Browse files Browse the repository at this point in the history
…orting rates
  • Loading branch information
KeithJF82 committed Oct 11, 2023
1 parent f49a68c commit f35021c
Show file tree
Hide file tree
Showing 3 changed files with 517 additions and 3 deletions.
3 changes: 1 addition & 2 deletions R/mcmc.R
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,6 @@ param_prop_setup <- function(log_params=c(),chain_cov=1,adapt=0){
#' If mode_start=3, shift some non-vaccinated individuals into recovered to give herd immunity (stratified by age)
#' @param prior_type Text indicating which type of calculation to use for prior probability
#' If prior_type = "zero", prior probability is always zero
#' If prior_type = "flat", prior probability is zero if FOI/R0 in designated ranges, -Inf otherwise
#' If prior_type = "exp", prior probability is given by dexp calculation on FOI/R0 values
#' If prior_type = "norm", prior probability is given by dnorm calculation on parameter values
#' @param norm_prior_sd TBA
Expand Down Expand Up @@ -642,7 +641,7 @@ mcmc_prelim_fit <- function(n_iterations=1,n_param_sets=1,n_bounds=1,type=NULL,l
assert_that(mode_start %in% c(0,1,3),msg="mode_start must have value 0, 1 or 3")
assert_that(length(log_params_min)==length(log_params_max),msg="Parameter limit vectors must have same lengths")
assert_that(type %in% c("FOI+R0","FOI","FOI+R0 enviro","FOI enviro"))
assert_that(prior_type %in% c("zero","flat","exp","norm"))
assert_that(prior_type %in% c("zero","exp","norm"))

best_fit_results=list()
n_params=length(log_params_min)
Expand Down
Loading

0 comments on commit f35021c

Please sign in to comment.