Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
KeithJF82 committed May 9, 2024
2 parents e3b852c + 1ae1bca commit a276fe0
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions R/main.R
Original file line number Diff line number Diff line change
Expand Up @@ -618,9 +618,9 @@ param_calc_enviro <- function(enviro_coeffs=c(),enviro_covar_values=c()){
assert_that(length(enviro_coeffs) %in% c(n_env_vars,2*n_env_vars),msg="Wrong number of environmental coefficients")

output=list(FOI=NA,R0=NA)
output$FOI=sum(enviro_coeffs[c(1:n_env_vars)]*enviro_covar_values)
output$FOI=max(0.0,sum(enviro_coeffs[c(1:n_env_vars)]*enviro_covar_values))
if(length(enviro_coeffs)==2*n_env_vars){
output$R0=sum(enviro_coeffs[c(1:n_env_vars)+n_env_vars]*enviro_covar_values)
output$R0=max(0.0,sum(enviro_coeffs[c(1:n_env_vars)+n_env_vars]*enviro_covar_values))
}

return(output)
Expand Down
2 changes: 1 addition & 1 deletion R/mcmc.R
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ single_posterior_calc <- function(log_params_prop=c(),input_data=list(),obs_sero
if (is.finite(prior_prop)) {

#Generate modelled data over all regions
if(p_rep_severe %in% names(consts$add_values)){
if("p_rep_severe" %in% names(consts$add_values)){
dataset <- Generate_Dataset(input_data,FOI_values,R0_values,obs_sero_data,obs_case_data,vaccine_efficacy,
consts$p_severe_inf,consts$p_death_severe_inf,p_rep_severe,p_rep_death,
consts$mode_start,start_SEIRV=NULL,consts$dt,consts$n_reps,consts$deterministic,
Expand Down
Binary file modified src/YEP.dll
Binary file not shown.
Binary file modified src/cpp11.o
Binary file not shown.

0 comments on commit a276fe0

Please sign in to comment.