Skip to content

Commit

Permalink
Update mcmc.R
Browse files Browse the repository at this point in the history
  • Loading branch information
KeithJF82 committed Jun 12, 2024
1 parent 8c54949 commit 7f4cfd4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/mcmc.R
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ MCMC <- function(log_params_ini=c(),input_data=list(),obs_sero_data=NULL,obs_cas

#Calculate likelihood using single_posterior_calc function
posterior_value_prop=single_posterior_calc(log_params_prop,input_data,obs_sero_data,obs_case_data,consts)
gc()

if(is.finite(posterior_value_prop)==FALSE) {
p_accept = -Inf
Expand Down Expand Up @@ -578,6 +579,7 @@ mcmc_prelim_fit <- function(n_iterations=1,n_param_sets=1,n_bounds=1,type=NULL,l

names(log_params_prop)=param_names
posterior_value=single_posterior_calc(log_params_prop,input_data,obs_sero_data,obs_case_data,consts)
gc()
results<-rbind(results,c(set,exp(log_params_prop),posterior_value))
if(set==1){colnames(results)=c("set",param_names,"posterior")}

Expand Down

0 comments on commit 7f4cfd4

Please sign in to comment.