Chapter 5 New Fidings
5.1 Finding the best model
5.1.1 Falciparum
library(tidyverse); library(useful);library(epiDisplay);library(lubridate); library(tictoc);library(usethis)
library(spdep); library(sf); library(sp); library(devtools); library(pkgload);library(readr);
library(stringr);library("viridis")
library(cowplot)
library(INLA)
library("devtools")
library("haven")
library("tidyverse")
library(Hmisc)
::source_gist("https://gist.github.com/gcarrascoe/89e018d99bad7d3365ec4ac18e3817bd")
devtoolsload("./CLIM_MAL_dat_20200826.RData")
<-dat %>%
datmutate(q_std =((q - mean(q,na.rm=T)) / sd(q,na.rm=T)),
aet_std =((aet - mean(aet,na.rm=T)) / sd(aet,na.rm=T)),
soilm_std =((soilm - mean(soilm,na.rm=T)) / sd(soilm,na.rm=T)),
prcp_day_std =(((prcp/30) - mean((prcp/30),na.rm=T)) / sd((prcp/30),na.rm=T)),
tmax_std =((tmax - mean(tmax,na.rm=T)) / sd(tmax,na.rm=T)),
tmin_std =((tmin - mean(tmin,na.rm=T)) / sd(tmin,na.rm=T)),
cum_loss_km2_std =((cum_loss_km2 - mean(cum_loss_km2,na.rm=T)) / sd(cum_loss_km2,na.rm=T)),
water_deficit_std =((water_deficit - mean(water_deficit,na.rm=T)) / sd(water_deficit,na.rm=T)))
<- dat %>%
datgroup_by(NOMBDIST) %>%
mutate(workers_lag_12=Lag(workers,+12),
nets_lag_12=Lag(nets,+12),
n_eess_lag_12=Lag(n_eess,+12),
enviro_lag_12=Lag(enviro,+12),
cum_loss_km2_std_lag_12=Lag(cum_loss_km2_std,+12),
#Lag1
soilm_std_lag1=Lag(soilm_std,+1),
q_std_lag1=Lag(q_std,+1),
aet_std_lag1=Lag(aet_std,+1),
tmax_std_lag1=Lag(tmax_std,+1),
tmin_std_lag1=Lag(tmin_std,+1),
prcp_day_std_lag1=Lag(prcp_day_std,+1),
water_deficit_std_lag1=Lag(water_deficit_std,+1),
#lag2
soilm_std_lag2=Lag(soilm_std,+2),
q_std_lag2=Lag(q_std,+2),
aet_std_lag2=Lag(aet_std,+2),
tmax_std_lag2=Lag(tmax_std,+2),
tmin_std_lag2=Lag(tmin_std,+2),
prcp_day_std_lag2=Lag(prcp_day_std,+2),
water_deficit_std_lag2=Lag(water_deficit_std,+2),
#lag3
soilm_std_lag3=Lag(soilm_std,+3),
q_std_lag3=Lag(q_std,+3),
aet_std_lag3=Lag(aet_std,+3),
tmax_std_lag3=Lag(tmax_std,+3),
tmin_std_lag3=Lag(tmin_std,+3),
prcp_day_std_lag3=Lag(prcp_day_std,+3),
water_deficit_std_lag3=Lag(water_deficit_std,+3)
)
<-dat %>%
dat.rev.vf::select(NOMBDIST,vivax,falciparum,index,year,month2,
dplyr
prcp_day_std,tmax_std,
prcp_day_std_lag1,tmax_std_lag1,
prcp_day_std_lag2,tmax_std_lag2,
prcp_day_std_lag3,tmax_std_lag3,
cum_loss_km2_std,
n_eess,workers,enviro,nets,
n_eess_lag_12, workers_lag_12, enviro_lag_12, nets_lag_12,
pop2015,
water_deficit_std,water_deficit_std_lag1,
water_deficit_std_lag2,water_deficit_std_lag3,
soilm_std,aet_std,q_std,tmin_std,
soilm_std_lag1,aet_std_lag1,q_std_lag1,tmin_std_lag1,
soilm_std_lag2,aet_std_lag2,q_std_lag2,tmin_std_lag2,
soilm_std_lag3,aet_std_lag3,q_std_lag3,tmin_std_lag3
)
dim(dat.rev.vf)
<-dat.rev.vf[complete.cases(dat.rev.vf),]
dat.rev.vf.cpltdim(dat.rev.vf.cplt) #9996
##############################################################################
<- c(
pf_explore ## models_pf_7
# 1
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ enviro,
workers
# 2
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12,
n_eess_lag_12
# 3
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 + q_std_lag1 + aet_std_lag1,
soilm_std_lag1
# 4
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 + q_std + aet_std,
soilm_std
# 5
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 6
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 7
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 + q_std_lag1 + aet_std_lag1,
soilm_std_lag1
# 8
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 + q_std + aet_std,
soilm_std
# 9
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 10
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 11
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 + q_std_lag1 + aet_std_lag1,
soilm_std_lag1
# 12
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 + q_std + aet_std,
soilm_std
# 13
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 14
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 15
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 + q_std_lag1 + aet_std_lag1,
soilm_std_lag1
# 16
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 + q_std + aet_std,
soilm_std
# 17
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 18
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 19
formula = falciparum ~ 1,
## models_pf_7_1
# 1
formula = falciparum ~ 1,
# 2
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 3
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1"),
# 4
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std), model = "rw1"),
# 5
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1"),
# 6
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1"),
# 7
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1"),
# 8
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1"),
# 9
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 10
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std),
model = "rw1"),
# 11
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 12
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 13
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 14
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(aet_std),
model = "rw1"),
# 15
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 16
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 17
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 18
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 19
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 20
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 21
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 22
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 23
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 24
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 25
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 26
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 27
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
## models_pf_7.3
# 1
formula = falciparum ~ 1,
# 2
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1") +
f(inla.group(water_deficit_std_lag1), model = "rw1"),
# 3
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 4
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std), model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 5
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 6
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 7
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 8
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 9
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std), model = "rw1") +
f(inla.group(water_deficit_std_lag1), model = "rw1") +
f(inla.group(water_deficit), model = "rw1"),
# 10
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std),
model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 11
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std), model = "rw1") +
f(inla.group(water_deficit_std_lag1), model = "rw1") +
f(inla.group(water_deficit), model = "rw1"),
# 12
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 13
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 14
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(aet_std),
model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 15
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 16
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 17
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 18
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 19
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 20
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 21
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1") +
f(inla.group(water_deficit_std_lag1), model = "rw1"),
# 22
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std), model = "rw1") +
f(inla.group(water_deficit_std_lag1), model = "rw1"),
# 23
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1") +
f(inla.group(water_deficit_std_lag1), model = "rw1"),
# 24
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std), model = "rw1") +
f(inla.group(water_deficit_std_lag1), model = "rw1"),
# 25
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1") +
f(inla.group(water_deficit_std_lag1), model = "rw1"),
# 26
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1") +
f(inla.group(water_deficit_std_lag1), model = "rw1"),
# 27
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1") +
f(inla.group(water_deficit_std_lag1), model = "rw1"),
## models_pf_7_book
# 1
formula = falciparum ~ 1,
# 2
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 3
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ enviro,
workers
# 4
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12,
n_eess_lag_12
# 5
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12
aet_std_lag1,
## models_pf_8
# 1
formula = falciparum ~ 1,
# 2
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1"),
# 3
formula = falciparum ~ 1 + f(index, model = "besag", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1"),
# 4
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2"),
# 5
formula = falciparum ~ 1 + f(index, model = "besag", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2"),
# 6
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2"),
# 7
formula = falciparum ~ 1 + f(index, model = "besag", graph = "map.graph") +
f(year, model = "rw1") + f(month2, model = "rw2"),
# 8
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "rw1") + f(month2, model = "rw2"),
## models_pf_8.1.2
# 1
formula = falciparum ~ 1,
# 2
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 3
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1"),
# 4
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std), model = "rw1"),
# 5
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1"),
# 6
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag2), model = "rw1"),
# 7
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag2), model = "rw1"),
# 8
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag2), model = "rw1"),
# 9
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 10
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std),
model = "rw1"),
# 11
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 12
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag2), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 13
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag2),
model = "rw1"),
# 14
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag2), model = "rw1") + f(inla.group(aet_std),
model = "rw1"),
# 15
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std_lag2),
model = "rw1"),
# 16
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag2), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 17
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std_lag2),
model = "rw1"),
# 18
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag2), model = "rw1") + f(inla.group(q_std_lag2),
model = "rw1"),
# 19
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag2), model = "rw1") + f(inla.group(aet_std_lag2),
model = "rw1"),
# 20
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag2), model = "rw1") + f(inla.group(aet_std_lag2),
model = "rw1"),
# 21
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag2), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 22
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag2),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 23
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag2), model = "rw1"),
# 24
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag2), model = "rw1") + f(inla.group(q_std_lag2),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 25
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag2), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag2), model = "rw1"),
# 26
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag2),
model = "rw1") + f(inla.group(aet_std_lag2), model = "rw1"),
# 27
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag2), model = "rw1") + f(inla.group(q_std_lag2),
model = "rw1") + f(inla.group(aet_std_lag2), model = "rw1"),
## models_pf_8.2
# 1
formula = falciparum ~ 1,
# 2
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 3
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1"),
# 4
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std), model = "rw1"),
# 5
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1"),
# 6
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1"),
# 7
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1"),
# 8
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1"),
# 9
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 10
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std),
model = "rw1"),
# 11
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 12
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 13
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 14
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(aet_std),
model = "rw1"),
# 15
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 16
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 17
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 18
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 19
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 20
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 21
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 22
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 23
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 24
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 25
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 26
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 27
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1")
)
names(pf_explore)<-pf_explore
##############################################################################
<-function(formula, dat1 = dat.rev.vf.cplt) {
inla.batch.cplt= inla(formula, data=dat1, family="nbinomial", offset=log(pop2015), verbose = F,
result #control.inla=list(strategy="gaussian"),
control.inla=list(strategy="adaptive"),
control.compute=list(config=F, dic=T, cpo=T, waic=T,
return.marginals = FALSE),
control.fixed = list(correlation.matrix=T),
control.predictor=list(link=1,compute=TRUE)
)return(result)
}
<- possibly(inla.batch.cplt, otherwise = NA_real_)
inla.batch.cplt.safe
##############################################################################
# Running our models
tic()
:::inla.dynload.workaround()
INLA<-pf_explore %>% purrr::map(~inla.batch.cplt.safe(formula = .))
test_pf_exploretoc()
test_pf_exploresaveRDS(test_pf_explore, file= "./_data/models_pf_explore.rds")
##############################################################################
# Choosing our best model
<- pf_explore_check %>%
pf_explore.s ::map(~Rsq.batch.safe(model = ., dic.null = pf_explore_check[[1]]$dic, n = n)) %>%
purrrbind_rows(.id = "formula") %>% mutate(id = row_number())
%>%
pf_explore.s plot_score()
5.1.2 Vivax
library(tidyverse); library(useful);library(epiDisplay);library(lubridate); library(tictoc);library(usethis)
library(spdep); library(sf); library(sp); library(devtools); library(pkgload);library(readr);
library(stringr);library("viridis")
library(cowplot)
library(INLA)
library("devtools")
library("haven")
library("tidyverse")
library(Hmisc)
::source_gist("https://gist.github.com/gcarrascoe/89e018d99bad7d3365ec4ac18e3817bd")
devtoolsload("./CLIM_MAL_dat_20200826.RData")
<-dat %>%
datmutate(q_std =((q - mean(q,na.rm=T)) / sd(q,na.rm=T)),
aet_std =((aet - mean(aet,na.rm=T)) / sd(aet,na.rm=T)),
soilm_std =((soilm - mean(soilm,na.rm=T)) / sd(soilm,na.rm=T)),
prcp_day_std =(((prcp/30) - mean((prcp/30),na.rm=T)) / sd((prcp/30),na.rm=T)),
tmax_std =((tmax - mean(tmax,na.rm=T)) / sd(tmax,na.rm=T)),
tmin_std =((tmin - mean(tmin,na.rm=T)) / sd(tmin,na.rm=T)),
cum_loss_km2_std =((cum_loss_km2 - mean(cum_loss_km2,na.rm=T)) / sd(cum_loss_km2,na.rm=T)),
water_deficit_std =((water_deficit - mean(water_deficit,na.rm=T)) / sd(water_deficit,na.rm=T)))
<- dat %>%
datgroup_by(NOMBDIST) %>%
mutate(workers_lag_12=Lag(workers,+12),
nets_lag_12=Lag(nets,+12),
n_eess_lag_12=Lag(n_eess,+12),
enviro_lag_12=Lag(enviro,+12),
cum_loss_km2_std_lag_12=Lag(cum_loss_km2_std,+12),
#Lag1
soilm_std_lag1=Lag(soilm_std,+1),
q_std_lag1=Lag(q_std,+1),
aet_std_lag1=Lag(aet_std,+1),
tmax_std_lag1=Lag(tmax_std,+1),
tmin_std_lag1=Lag(tmin_std,+1),
prcp_day_std_lag1=Lag(prcp_day_std,+1),
water_deficit_std_lag1=Lag(water_deficit_std,+1),
#lag2
soilm_std_lag2=Lag(soilm_std,+2),
q_std_lag2=Lag(q_std,+2),
aet_std_lag2=Lag(aet_std,+2),
tmax_std_lag2=Lag(tmax_std,+2),
tmin_std_lag2=Lag(tmin_std,+2),
prcp_day_std_lag2=Lag(prcp_day_std,+2),
water_deficit_std_lag2=Lag(water_deficit_std,+2),
#lag3
soilm_std_lag3=Lag(soilm_std,+3),
q_std_lag3=Lag(q_std,+3),
aet_std_lag3=Lag(aet_std,+3),
tmax_std_lag3=Lag(tmax_std,+3),
tmin_std_lag3=Lag(tmin_std,+3),
prcp_day_std_lag3=Lag(prcp_day_std,+3),
water_deficit_std_lag3=Lag(water_deficit_std,+3)
)
<-dat %>%
dat.rev.vf::select(NOMBDIST,vivax,falciparum,index,year,month2,
dplyr
prcp_day_std,tmax_std,
prcp_day_std_lag1,tmax_std_lag1,
prcp_day_std_lag2,tmax_std_lag2,
prcp_day_std_lag3,tmax_std_lag3,
cum_loss_km2_std,
n_eess,workers,enviro,nets,
n_eess_lag_12, workers_lag_12, enviro_lag_12, nets_lag_12,
pop2015,
water_deficit_std,water_deficit_std_lag1,
water_deficit_std_lag2,water_deficit_std_lag3,
soilm_std,aet_std,q_std,tmin_std,
soilm_std_lag1,aet_std_lag1,q_std_lag1,tmin_std_lag1,
soilm_std_lag2,aet_std_lag2,q_std_lag2,tmin_std_lag2,
soilm_std_lag3,aet_std_lag3,q_std_lag3,tmin_std_lag3
)
dim(dat.rev.vf)
<-dat.rev.vf[complete.cases(dat.rev.vf),]
dat.rev.vf.cpltdim(dat.rev.vf.cplt) #9996
##############################################################################
<- c(
pv_explore ## models_pv_7
# 1
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ enviro + nets,
n_eess
# 2
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12,
n_eess_lag_12
# 3
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 + q_std_lag1 + aet_std_lag1,
soilm_std_lag1
# 4
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 + q_std + aet_std,
soilm_std
# 5
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 6
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
(model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 7
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 + q_std_lag1 + aet_std_lag1,
soilm_std_lag1
# 8
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 + q_std + aet_std,
soilm_std
# 9
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 10
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 11
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
model = "iid") + f(month2, model = "rw1") +
(year, f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 + q_std_lag1 + aet_std_lag1,
soilm_std_lag1
# 12
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 + q_std + aet_std,
soilm_std
# 13
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 14
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 15
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 + q_std_lag1 + aet_std_lag1,
soilm_std_lag1
# 16
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 + q_std + aet_std,
soilm_std
# 17
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 18
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 19
formula = vivax ~ 1,
## models_pv_7_1
# 1
formula = vivax ~ 1,
# 2
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 3
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1"),
# 4
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std), model = "rw1"),
# 5
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1"),
# 6
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1"),
# 7
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1"),
# 8
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1"),
# 9
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 10
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std),
model = "rw1"),
# 11
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 12
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 13
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 14
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(aet_std),
model = "rw1"),
# 15
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 16
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 17
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 18
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 19
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 20
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 21
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 22
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 23
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 24
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 25
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 26
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 27
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
## models_pv_7_2
# 1
formula = vivax ~ 1,
# 2
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 3
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1"),
# 4
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std), model = "rw1"),
# 5
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1"),
# 6
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1"),
# 7
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1"),
# 8
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1"),
# 9
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 10
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std),
model = "rw1"),
# 11
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 12
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 13
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 14
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(aet_std),
model = "rw1"),
# 15
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 16
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 17
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 18
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 19
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 20
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 21
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 22
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 23
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 24
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 25
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 26
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 27
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
## models_pv_7_3
# 1
formula = vivax ~ 1,
# 2
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1") +
f(inla.group(water_deficit_std_lag1), model = "rw1"),
# 3
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 4
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std), model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 5
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 6
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 7
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 8
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 9
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std), model = "rw1") +
f(inla.group(water_deficit_std_lag1), model = "rw1") + f(inla.group(water_deficit),
model = "rw1"),
# 10
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std),
model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 11
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std), model = "rw1") +
f(inla.group(water_deficit_std_lag1), model = "rw1") + f(inla.group(water_deficit),
model = "rw1"),
# 12
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 13
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 14
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(aet_std),
model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 15
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 16
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 17
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 18
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 19
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 20
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1") + f(inla.group(water_deficit_std_lag1),
model = "rw1"),
# 21
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1") +
f(inla.group(water_deficit_std_lag1), model = "rw1"),
# 22
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std), model = "rw1") +
f(inla.group(water_deficit_std_lag1), model = "rw1"),
# 23
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1") +
f(inla.group(water_deficit_std_lag1), model = "rw1"),
# 24
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std), model = "rw1") +
f(inla.group(water_deficit_std_lag1), model = "rw1"),
# 25
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1") +
f(inla.group(water_deficit_std_lag1), model = "rw1"),
# 26
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1") +
f(inla.group(water_deficit_std_lag1), model = "rw1"),
# 27
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1") +
f(inla.group(water_deficit_std_lag1), model = "rw1"),
## models_pv_7_book
# 1
formula = vivax ~ 1,
# 2
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 3
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ n_eess + enviro,
nets
# 4
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12,
n_eess_lag_12
# 5
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12
aet_std_lag1,
## models_pv_8_2
# 1
formula = vivax ~ 1,
# 2
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 3
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1"),
# 4
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std), model = "rw1"),
# 5
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1"),
# 6
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1"),
# 7
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1"),
# 8
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1"),
# 9
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 10
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std),
model = "rw1"),
# 11
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 12
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 13
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 14
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(aet_std),
model = "rw1"),
# 15
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 16
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 17
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 18
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 19
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 20
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 21
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 22
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 23
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 24
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 25
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 26
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 27
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
## models_pv_8_2_2
# 1
formula = vivax ~ 1,
# 2
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 3
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1"),
# 4
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std), model = "rw1"),
# 5
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1"),
# 6
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag3), model = "rw1"),
# 7
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag3), model = "rw1"),
# 8
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag3), model = "rw1"),
# 9
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 10
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std),
model = "rw1"),
# 11
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 12
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag3), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 13
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag3),
model = "rw1"),
# 14
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag3), model = "rw1") + f(inla.group(aet_std),
model = "rw1"),
# 15
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std_lag3),
model = "rw1"),
# 16
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag3), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 17
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std_lag3),
model = "rw1"),
# 18
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag3), model = "rw1") + f(inla.group(q_std_lag3),
model = "rw1"),
# 19
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag3), model = "rw1") + f(inla.group(aet_std_lag3),
model = "rw1"),
# 20
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag3), model = "rw1") + f(inla.group(aet_std_lag3),
model = "rw1"),
# 21
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag3), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 22
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag3),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 23
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag3), model = "rw1"),
# 24
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag3), model = "rw1") + f(inla.group(q_std_lag3),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 25
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag3), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag3), model = "rw1"),
# 26
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag3),
model = "rw1") + f(inla.group(aet_std_lag3), model = "rw1"),
# 27
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag3), model = "rw1") + f(inla.group(q_std_lag3),
model = "rw1") + f(inla.group(aet_std_lag3), model = "rw1"),
## models_pv_8_3
# 1
formula = vivax ~ 1,
# 2
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 3
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1"),
# 4
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std), model = "rw1"),
# 5
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1"),
# 6
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1"),
# 7
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1"),
# 8
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1"),
# 9
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 10
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std),
model = "rw1"),
# 11
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 12
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 13
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 14
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(aet_std),
model = "rw1"),
# 15
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 16
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 17
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 18
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 19
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 20
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 21
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 22
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 23
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 24
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 25
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 26
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 27
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
## models_pv_8_4
# 1
formula = vivax ~ 1,
# 2
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 3
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1"),
# 4
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std), model = "rw1"),
# 5
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1"),
# 6
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1"),
# 7
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1"),
# 8
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1"),
# 9
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 10
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std),
model = "rw1"),
# 11
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 12
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 13
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 14
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(aet_std),
model = "rw1"),
# 15
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 16
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 17
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 18
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 19
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 20
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 21
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 22
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 23
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 24
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 25
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 26
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 27
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
## models_pv_8_6
# 1
formula = vivax ~ 1,
# 2
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 3
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1"),
# 4
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std), model = "rw1"),
# 5
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1"),
# 6
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1"),
# 7
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1"),
# 8
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1"),
# 9
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 10
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std),
model = "rw1"),
# 11
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 12
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 13
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 14
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(aet_std),
model = "rw1"),
# 15
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 16
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 17
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 18
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 19
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 20
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 21
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 22
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 23
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 24
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 25
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 26
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 27
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
## models_pv_8_9
# 1
formula = vivax ~ 1,
# 2
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 3
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1"),
# 4
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std), model = "rw1"),
# 5
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1"),
# 6
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1"),
# 7
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1"),
# 8
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1"),
# 9
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 10
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std),
model = "rw1"),
# 11
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 12
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 13
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 14
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(aet_std),
model = "rw1"),
# 15
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 16
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# 17
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 18
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1"),
# 19
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 20
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
# 21
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 22
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 23
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 24
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std), model = "rw1"),
# 25
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 26
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1"),
# 27
formula = vivax ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmin_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(soilm_std_lag1), model = "rw1") + f(inla.group(q_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1")
)
names(pv_explore)<-pv_explore
##############################################################################
<-function(formula, dat1 = dat.rev.vf.cplt) {
inla.batch.cplt= inla(formula, data=dat1, family="nbinomial", offset=log(pop2015), verbose = F,
result #control.inla=list(strategy="gaussian"),
control.inla=list(strategy="adaptive"),
control.compute=list(config=F, dic=T, cpo=T, waic=T,
return.marginals = FALSE),
control.fixed = list(correlation.matrix=T),
control.predictor=list(link=1,compute=TRUE)
)return(result)
}
<- possibly(inla.batch.cplt, otherwise = NA_real_)
inla.batch.cplt.safe
##############################################################################
# Running our models
tic()
:::inla.dynload.workaround()
INLA<-pv_explore %>% purrr::map(~inla.batch.cplt.safe(formula = .))
test_pv_exploretoc()
test_pv_exploresaveRDS(test_pv_explore, file= "./_data/models_pv_explore.rds")
##############################################################################
# Choosing our best model
<- pv_explore_check %>%
pv_explore.s ::map(~Rsq.batch.safe(model = ., dic.null = pv_explore_check[[1]]$dic, n = n)) %>%
purrrbind_rows(.id = "formula") %>% mutate(id = row_number())
%>%
pv_explore.s plot_score()
5.2 Final Models
5.2.1 Falciparum
1. Spatio-temporal model
\[ \begin{aligned} Falciparum = &\alpha + \beta_{t(m(rw1))} + \gamma_{t(a)} +\phi_{s} +\nu_{s} \\ \end{aligned} \]
2. Climate model
\[ \begin{aligned} Falciparum = &\alpha + \beta_{t(m(rw1))} + \gamma_{t(a)} + \phi_{s} + \nu_{s} \\ &+f(prcp) +f(t_{max,lag1}) +f(runoff_{lag1}) +f(aet_{lag1}) \end{aligned} \]
3. Malaria-control model
\[ \begin{aligned} Falciparum = &\alpha + \beta_{t(m(rw1))} + \gamma_{t(a)} + \phi_{s} + \nu_{s} \\ &+f(prcp) +f(t_{max,lag1}) +f(runoff_{lag1}) +f(aet_{lag1}) \\ &+enviro_{lag12} + nets_{lag12} + hfd_{lag12} + workers_{lag12} \end{aligned} \]
4. Full model
\[ \begin{aligned} Falciparum = &\alpha + \beta_{t(m(rw1))} + \gamma_{t(a)} + \phi_{s} + \nu_{s} \\ &+f({cumloss\ km^2}) +f(prcp) +f(t_{max,lag1}) +f(runoff_{lag1}) +f(aet_{lag1}) \\ &+enviro_{lag12} + nets_{lag12} + hfd_{lag12} + workers_{lag12} \end{aligned} \]
# P. Falciparum
# 1. Spatio-temporal model
~ 1 + f(index, model = "bym", graph = "map.graph") +
falciparum f(year, model = "iid") + f(month2, model = "rw1")
# 2. Climate model
~ 1 + f(index, model = "bym", graph = "map.graph") +
falciparum f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1") +
f(inla.group(q_std_lag1), model = "rw1")
# 3. Malaria-control model
~ 1 + f(index, model = "bym", graph = "map.graph") +
falciparum f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1") +
f(inla.group(q_std_lag1), model = "rw1") + n_eess_lag_12 +
+ enviro_lag_12 + nets_lag_12
workers_lag_12
# 4. Full model
~ 1 + f(index, model = "bym", graph = "map.graph") +
falciparum f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1")
5.2.2 Vivax
1. Spatio-temporal model
\[ \begin{aligned} Vivax = &\alpha + \beta_{t(m(rw2))} + \gamma_{t(a)} +\phi_{s} +\nu_{s} \\ \end{aligned} \]
2. Climate model
\[ \begin{aligned} Vivax = &\alpha + \beta_{t(m(rw2))} + \gamma_{t(a)} +\phi_{s} +\nu_{s} \\ &+f(prcp_{lag1}) +f(t_{max}) +f(aet_{lag1}) +f(runoff) \end{aligned} \]
3. Malaria-control model
\[ \begin{aligned} Vivax = &\alpha + \beta_{t(m(rw2))} + \gamma_{t(a)} +\phi_{s} +\nu_{s} \\ &+f(prcp_{lag1}) +f(t_{max}) +f(aet_{lag1}) +f(runoff) \\ &+enviro_{lag12} + nets_{lag12}+ hfd_{lag12} + workers_{lag12} \end{aligned} \]
4. Full model
\[ \begin{aligned} Vivax = &\alpha + \beta_{t(m(rw2))} + \gamma_{t(a)} +\phi_{s} +\nu_{s} \\ & +f({cumloss\ km^2}) +f(prcp_{lag1}) +f(t_{max}) +f(aet_{lag1}) +f(runoff) \\ &+enviro_{lag12} + nets_{lag12}+ hfd_{lag12} + workers_{lag12} \end{aligned} \]
# P. Vivax
# 1. Spatio-temporal model
~ 1 + f(index, model = "bym", graph = "map.graph") +
vivax f(year, model = "iid") + f(month2, model = "rw2")
# 2. Climate model
~ 1 + f(index, model = "bym", graph = "map.graph") +
vivax f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(aet_std_lag1), model = "rw1") +
f(inla.group(q_std), model = "rw1")
# 3. Malaria-control model
~ 1 + f(index, model = "bym", graph = "map.graph") +
vivax f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + n_eess_lag_12 + workers_lag_12 + enviro_lag_12 +
+ f(inla.group(aet_std_lag1), model = "rw1") +
nets_lag_12 f(inla.group(q_std), model = "rw1")
# 4. Full model
~ 1 + f(index, model = "bym", graph = "map.graph") +
vivax f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1")
5.3 Selection Model
<-test_pf_7_back_3[c(2,3,4,5)]%>%
pf_check7.s::map(~Rsq.batch.safe(model = ., dic.null = test_pf_7_back_3[[1]]$dic, n = n)) %>%
purrrbind_rows(.id = "formula") %>% mutate(id = row_number())
<-test_pv_8.3_back_2[c(2,3,4,5)]%>%
pv_check7.s::map(~Rsq.batch.safe(model = ., dic.null = test_pv_8.3_back_2[[1]]$dic, n = n)) %>%
purrrbind_rows(.id = "formula") %>% mutate(id = row_number())
<-pf_check7.s %>%
a.falciparumgather(key, value, -formula)%>%
ungroup() %>%
group_by(key) %>%
filter(!(key %in% c("Rsq", "log score","id","pD","waic pD")))
<- a.falciparum %>%
a.falciparum_newgroup_by(key) %>%
mutate(position = rank(-value))
<-pv_check7.s %>%
a.vivaxgather(key, value, -formula)%>%
ungroup() %>%
group_by(key) %>%
filter(!(key %in% c("Rsq", "log score","id","pD","waic pD")))
<- a.vivax %>%
a.vivax_newgroup_by(key) %>%
mutate(position = rank(-value))
<- a.falciparum_new %>% ggplot(aes(x=key, y=value, fill=reorder(formula, -value), group = position)) +
graf.falciparumgeom_bar(stat="identity", position="dodge") +
theme(axis.title.y=element_blank(),
axis.title.x=element_blank(),
axis.ticks.x=element_blank(),
panel.background =element_blank(),
panel.grid.major=element_blank(),
panel.grid.minor=element_blank(),
strip.background =element_blank(),
strip.text = element_text(face="bold",size=12),
plot.title = element_text(face = "bold"))+
coord_cartesian(ylim=c(44000,46500))+
ggtitle("Falciparum: Selection model ", subtitle = "by dic and waic information criteria") +
scale_fill_manual(values=c("#86BB8D", "#4c4c4c", "#68a4bd", "#ff9900"),
labels = c("Spatio-temporal model", "Climate model", "Malaria-control model", "Full model") ,name="Model")
<- a.vivax_new %>% ggplot(aes(x=key, y=value, fill=reorder(formula, -value), group = position)) +
graf.vivaxgeom_bar(stat="identity", position="dodge") +
theme(axis.title.y=element_blank(),
axis.title.x=element_blank(),
axis.ticks.x=element_blank(),
panel.background =element_blank(),
panel.grid.major=element_blank(),
panel.grid.minor=element_blank(),
strip.background =element_blank(),
strip.text = element_text(face="bold",size=12),
plot.title = element_text(face = "bold"))+
coord_cartesian(ylim=c(65000,72000))+
ggtitle("Vivax: Selection model ", subtitle = "by dic and waic information criteria") +
scale_fill_manual(values=c("#86BB8D", "#4c4c4c", "#68a4bd", "#ff9900"),
labels = c("Spatio-temporal model", "Climate model", "Malaria-control model", "Full model") ,name="Model")
library(cowplot)
<-plot_grid(graf.vivax,graf.falciparum, nrow = 1, ncol=2, labels = c("A)", "B)"), label_size=15, align = "hv", rel_widths = 1)) (sf_5
5.4 Fixed Effects
5.4.1 Nonlinear model
# Antiguo
# P. Vivax
<- test_pv_8.3_back_2[c(5)] %>%
sv_7_pv plot_fixed.safe(title = "P. Vivax",
filter=5,
legend = F,
ylim = 6,
angle = 0,
hjust = .5,
lim = c("workers_lag_12","nets_lag_12",
"n_eess_lag_12","enviro_lag_12"),
xlab = c("Lag of workers","Lag of nets","Lag of hfd","Lag of enviro"),
breaks = c("1","2"),
lab_mod = c("Full model", ""),
flip=T)+
ylab("Incidence Rate Ratio (IRR)")+
theme(plot.margin = unit(c(1,1,1,1), "lines"))
# P. Falciparum
<- test_pf_7_back_3[c(5)] %>%
sf_7_pf plot_fixed.safe(title = "P. Falciparum",
filter=5,
legend = F,
ylim = 6,
angle = 0,
hjust = .5,
lim = c("workers_lag_12","nets_lag_12",
"n_eess_lag_12","enviro_lag_12"),
xlab = c("Lag of workers","Lag of nets","Lag of hfd","Lag of enviro"),
breaks = c("1","2"),
lab_mod = c("Full model", ""),
flip=T)+
ylab("Incidence Rate Ratio (IRR)")+
theme(plot.margin = unit(c(1,1,1,1), "lines"))
library(cowplot)
<-plot_grid(sv_7_pv, sf_7_pf, nrow = 1, ncol=2, labels = c("A)", "B)"), label_size=30, align = "hv", rel_widths = 1)) (sf_6
#Requerimientos
library(tidyverse)
library(INLA)
#Graficos sin exponenciar
<-function(model, label = id, col1="black", dire=-1, breaks, lab_mod, lim, title, legend=NULL, filter, ylab = "Relative risk", ylim = 10, angle=45, hjust = 1, xlabs=lim, b.size=20, flip=F) {
plot.log.fixedlibrary(ggsci)
<- enquo(label)
label
<- function(model) {
extract_dat <- model$summary.fixed %>%
mydata rownames_to_column(var = "var")
return(mydata)
}
<- data.frame(var=NA)
dat_na
<- possibly(extract_dat, otherwise = dat_na)
extract_dat.safe
<- model %>% purrr::map(~extract_dat.safe(model=.)) %>%
fixed_log_plot bind_rows(.id = "formula") %>%
mutate(id = match(formula, unique(formula))) %>%
#mutate(id = group_indices(., factor(formula, levels = unique(formula)))) %>%
filter(!is.na(`0.025quant`), `0.5quant`<filter) %>%
ggplot(aes(x = var, y = `0.5quant`, col=factor(id))) +
geom_point(position = position_dodge(0.3)) +
geom_errorbar(aes(ymin = `0.025quant`, ymax = `0.975quant`), width=.1, position = position_dodge(0.3)) +
geom_hline(aes(yintercept = 0), col=col1, linetype="dashed", size=.4) +
#scale_color_discrete(name="Models", breaks=breaks, labels=lab_mod) +
::scale_color_npg(name="Models", breaks=breaks, labels=lab_mod) +
ggsciscale_x_discrete(limits=lim, labels = xlabs) +
ylim(-3, ylim) +
if(!is.null(legend)) {guides(color = legend)}} +
{labs(title=title, x = "variables") +
theme_bw(base_size = b.size) +
labs(y=ylab) +
if(isTRUE(flip)) {coord_flip()}} +
{theme(axis.text.x = element_text(angle = angle, hjust = hjust))
return(fixed_log_plot)
}
<- possibly(plot.log.fixed, otherwise = NA_real_)
plot.log.fixed.safe
# P. Vivax
<- test_pv_8.3_back_2[c(5)] %>%
sv_log_pv plot.log.fixed.safe(title = "P. Vivax",
filter=8,
legend = F,
ylim = 3,
angle = 0,
hjust = .5,
lim = c("workers_lag_12","nets_lag_12",
"n_eess_lag_12","enviro_lag_12"),
xlab = c("Lag of workers","Lag of nets","Lag of hfd","Lag of enviro"),
breaks = c("1","2"),
lab_mod = c("Full model", ""),
flip=T)+
ylab("Log (IR)")+
theme(plot.margin = unit(c(1,1,1,1), "lines"))
# P. Falciparum
<- test_pf_7_back_3[c(5)] %>%
sf_log_pf plot.log.fixed.safe(title = "P. Falciparum",
filter=8,
legend = F,
ylim = 3,
angle = 0,
hjust = .5,
lim = c("workers_lag_12","nets_lag_12",
"n_eess_lag_12","enviro_lag_12"),
xlab = c("Lag of workers","Lag of nets","Lag of hfd","Lag of enviro"),
breaks = c("1","2"),
lab_mod = c("Full model", ""),
flip=T)+
ylab("Log (IR)")+
theme(plot.margin = unit(c(1,1,1,1), "lines"))
library(cowplot)
<-plot_grid(sv_log_pv, sf_log_pf, nrow = 1, ncol=2, labels = c("A)", "B)"), label_size=30, align = "hv", rel_widths = 1)) (sf_6
5.4.2 Linear model
#Antiguo
# P. Vivax
<- test_pv_backlineal[c(5)] %>%
sv_7_pv plot_fixed.safe(title = "P. Vivax",
filter=5,
legend = F,
ylim = 6,
angle = 0,
hjust = .5,
lim = c("workers_lag_12","nets_lag_12",
"n_eess_lag_12","enviro_lag_12",
"prcp_day_std_lag1","tmax_std",
"cum_loss_km2_std","q_std",
"aet_std_lag1"),
xlab = c("Lag of workers","Lag of nets",
"Lag of hfd","Lag of enviro",
"Lag precipitation","Max temperature",
"Cum loss","Runoff",
"Lag aet"),
breaks = c("1","2"),
lab_mod = c("Full model", ""),
flip=T)+
ylab("Incidence Rate Ratio (IRR)")+
theme(plot.margin = unit(c(1,1,1,1), "lines"))
# P. Falciparum
<- test_pf_backlineal[c(5)] %>%
sf_7_pf plot_fixed.safe(title = "P. Falciparum",
filter=5,
legend = F,
ylim = 6,
angle = 0,
hjust = .5,
lim = c("workers_lag_12","nets_lag_12",
"n_eess_lag_12","enviro_lag_12",
"prcp_day_std","tmax_std_lag1",
"cum_loss_km2_std","q_std_lag1",
"aet_std_lag1"),
xlab = c("Lag of workers","Lag of nets",
"Lag of hfd","Lag of enviro",
"Precipitation","Lag of max temperature",
"Cum loss","Lag of runoff",
"Lag of aet"),
breaks = c("1","2"),
lab_mod = c("Full model", ""),
flip=T)+
ylab("Incidence Rate Ratio (IRR)")+
theme(plot.margin = unit(c(1,1,1,1), "lines"))
library(cowplot)
<-plot_grid(sv_7_pv, sf_7_pf, nrow = 1, ncol=2, labels = c("A)", "B)"), label_size=30, align = "hv", rel_widths = 1)) (sf_6
#Requerimientos
library(tidyverse)
library(INLA)
#Graficos sin exponenciar
<-function(model, label = id, col1="black", dire=-1, breaks, lab_mod, lim, title, legend=NULL, filter, ylab = "Relative risk", ylim = 10, angle=45, hjust = 1, xlabs=lim, b.size=20, flip=F) {
plot.log.fixedlibrary(ggsci)
<- enquo(label)
label
<- function(model) {
extract_dat <- model$summary.fixed %>%
mydata rownames_to_column(var = "var")
return(mydata)
}
<- data.frame(var=NA)
dat_na
<- possibly(extract_dat, otherwise = dat_na)
extract_dat.safe
<- model %>% purrr::map(~extract_dat.safe(model=.)) %>%
fixed_log_plot bind_rows(.id = "formula") %>%
mutate(id = match(formula, unique(formula))) %>%
#mutate(id = group_indices(., factor(formula, levels = unique(formula)))) %>%
filter(!is.na(`0.025quant`), `0.5quant`<filter) %>%
ggplot(aes(x = var, y = `0.5quant`, col=factor(id))) +
geom_point(position = position_dodge(0.3)) +
geom_errorbar(aes(ymin = `0.025quant`, ymax = `0.975quant`), width=.1, position = position_dodge(0.3)) +
geom_hline(aes(yintercept = 0), col=col1, linetype="dashed", size=.4) +
#scale_color_discrete(name="Models", breaks=breaks, labels=lab_mod) +
::scale_color_npg(name="Models", breaks=breaks, labels=lab_mod) +
ggsciscale_x_discrete(limits=lim, labels = xlabs) +
ylim(-3, ylim) +
if(!is.null(legend)) {guides(color = legend)}} +
{labs(title=title, x = "variables") +
theme_bw(base_size = b.size) +
labs(y=ylab) +
if(isTRUE(flip)) {coord_flip()}} +
{theme(axis.text.x = element_text(angle = angle, hjust = hjust))
return(fixed_log_plot)
}
<- possibly(plot.log.fixed, otherwise = NA_real_)
plot.log.fixed.safe
# P. Vivax
<- test_pv_backlineal[c(5)] %>%
sv_log_pv plot.log.fixed.safe(title = "P. Vivax",
filter=8,
legend = F,
ylim = 3,
angle = 0,
hjust = .5,
lim = c("workers_lag_12","nets_lag_12",
"n_eess_lag_12","enviro_lag_12",
"prcp_day_std_lag1","tmax_std",
"cum_loss_km2_std","q_std",
"aet_std_lag1"),
xlab = c("Lag of workers","Lag of nets",
"Lag of hfd","Lag of enviro",
"Lag precipitation","Max temperature",
"Cum loss","Runoff",
"Lag aet"),
breaks = c("1","2"),
lab_mod = c("Full model", ""),
flip=T)+
ylab("Log (IR)")+
theme(plot.margin = unit(c(1,1,1,1), "lines"))
# P. Falciparum
<- test_pf_backlineal[c(5)] %>%
sf_log_pf plot.log.fixed.safe(title = "P. Falciparum",
filter=8,
legend = F,
ylim = 3,
angle = 0,
hjust = .5,
lim = c("workers_lag_12","nets_lag_12",
"n_eess_lag_12","enviro_lag_12",
"prcp_day_std","tmax_std_lag1",
"cum_loss_km2_std","q_std_lag1",
"aet_std_lag1"),
xlab = c("Lag of workers","Lag of nets",
"Lag of hfd","Lag of enviro",
"Precipitation","Lag of max temperature",
"Cum loss","Lag of runoff",
"Lag of aet"),
breaks = c("1","2"),
lab_mod = c("Full model", ""),
flip=T)+
ylab("Log (IR)")+
theme(plot.margin = unit(c(1,1,1,1), "lines"))
library(cowplot)
<-plot_grid(sv_log_pv, sf_log_pf, nrow = 1, ncol=2, labels = c("A)", "B)"), label_size=30, align = "hv", rel_widths = 1)) (sf_6
5.5 Figure 4 Spatial heterogeneity of covariates effects in terms of mean absolute error
library(colorspace)
library(sf)
library(ggthemes)
library(Hmisc)
<-dat %>%
datmutate(q_std =((q - mean(q,na.rm=T)) / sd(q,na.rm=T)),
aet_std =((aet - mean(aet,na.rm=T)) / sd(aet,na.rm=T)),
soilm_std =((soilm - mean(soilm,na.rm=T)) / sd(soilm,na.rm=T)),
prcp_day_std =(((prcp/30) - mean((prcp/30),na.rm=T)) / sd((prcp/30),na.rm=T)),
tmax_std =((tmax - mean(tmax,na.rm=T)) / sd(tmax,na.rm=T)),
tmin_std =((tmin - mean(tmin,na.rm=T)) / sd(tmin,na.rm=T)),
cum_loss_km2_std =((cum_loss_km2 - mean(cum_loss_km2,na.rm=T)) / sd(cum_loss_km2,na.rm=T)),
water_deficit_std =((water_deficit - mean(water_deficit,na.rm=T)) / sd(water_deficit,na.rm=T)))
<- dat %>%
datgroup_by(NOMBDIST) %>%
mutate(workers_lag_12=Lag(workers,+12),
nets_lag_12=Lag(nets,+12),
n_eess_lag_12=Lag(n_eess,+12),
enviro_lag_12=Lag(enviro,+12),
cum_loss_km2_std_lag_12=Lag(cum_loss_km2_std,+12),
soilm_std_lag1=Lag(soilm_std,+1),
q_std_lag1=Lag(q_std,+1),
aet_std_lag1=Lag(aet_std,+1),
tmax_std_lag1=Lag(tmax_std,+1),
tmin_std_lag1=Lag(tmin_std,+1),
prcp_day_std_lag1=Lag(prcp_day_std,+1),
water_deficit_std_lag1=Lag(water_deficit_std,+1))
<-dat %>%
dat.rev.vf::select(NOMBDIST,vivax,falciparum,index,year,month2,
dplyr
prcp_day_std,prcp_day_std_lag1,tmax_std,tmax_std_lag1,
cum_loss_km2_std,
n_eess,workers,enviro,nets,
n_eess_lag_12, workers_lag_12, enviro_lag_12,
nets_lag_12,pop2015,water_deficit_std,water_deficit_std_lag1,
soilm_std,aet_std,q_std,tmin_std,
soilm_std_lag1,aet_std_lag1,q_std_lag1,tmin_std_lag1)
<-dat.rev.vf[complete.cases(dat.rev.vf),]
dat.rev.vf.cplt
###########################################
# P. Vivax
###########################################
<- c(
pv_8.ma
# clima
~ 1 + f(index, model = "bym", graph = "map.graph") +
vivax f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12,
n_eess_lag_12
# control-malaria
~ 1 + f(index, model = "bym", graph = "map.graph") +
vivax f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
f(inla.group(aet_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# deforestacion
~ 1 + f(index, model = "bym", graph = "map.graph") +
vivax f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# full
~ 1 + f(index, model = "bym", graph = "map.graph") +
vivax f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1")
)
###########################################
# P. Falciparum
###########################################
<-c(
pf_7.ma
#Full model
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
#clima
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(cum_loss_km2_std), model = "rw1") + n_eess_lag_12 +
+ enviro_lag_12 + nets_lag_12,
workers_lag_12
#controles malaria
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
f(inla.group(q_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
#deforestacion
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + n_eess_lag_12 + workers_lag_12 + enviro_lag_12 +
+ f(inla.group(q_std_lag1), model = "rw1") +
nets_lag_12 f(inla.group(aet_std_lag1), model = "rw1")
)
# P. Vivax#######################################################################
<-plot_mae2(dat1 = dat.rev.vf.cplt, var = vivax, full = test_pv_8_mae[[4]],
f3_amodel1 = test_pv_8_mae[[1]], model2 = test_pv_8_mae[[2]], model3 = test_pv_8_mae[[3]],
map = area.sf, id = NOMBDIST)
<- f3_a[[3]] %>%
dat.f3a ::select(NOMBDIST, m1:m3, i1:i3) %>%
dplyr::rename(climate_val=m1, `malaria-control_val`=m2, deforestation_val=m3,
dplyrclimate_i=i1, `malaria-control_i`=i2, deforestation_i=i3) %>%
gather(type, val, climate_val:deforestation_i) %>%
separate(type, into = c("type","i"), sep = "_") %>%
spread(i,val) %>%
mutate(i = as.numeric(i),
i = ifelse(i<0,NA,i),
i = ifelse(i>100,NA,i)
%>%
) mutate(val = ifelse(val=="No Added", val, "Added"))
<- dat.f3a %>%
f3a ggplot() +
geom_sf(aes(fill=i)) +
scale_fill_continuous_sequential(palette="blues", na="white", trans="pseudo_log",
breaks = c(1,3,8,15,30), labels = c("No \nadded","3","8","15","30")) + labs(fill = "Added value: MAE(diff) \n ") +
theme_few(base_size = 20) +
theme(legend.position = "top",
panel.spacing = unit(2, "lines"),
legend.text = element_text(size = 10)) +
facet_wrap(.~type)
# P. Falciparum###################################################
<-plot_mae2(dat1 = dat.rev.vf.cplt, var = falciparum, full = test_pf_7_mae[[1]],
f3_bmodel1 = test_pf_7_mae[[2]], model2 = test_pf_7_mae[[3]], model3 = test_pf_7_mae[[4]],
map = area.sf, id = NOMBDIST)
<- f3_b[[3]] %>%
dat.f3b ::select(NOMBDIST, m1:m3, i1:i3) %>%
dplyr::rename(climate_val=m1, `malaria-control_val`=m2, deforestation_val=m3,
dplyrclimate_i=i1, `malaria-control_i`=i2, deforestation_i=i3) %>%
gather(type, val, climate_val:deforestation_i) %>%
separate(type, into = c("type","i"), sep = "_") %>%
spread(i,val) %>%
mutate(i = as.numeric(i),
i = ifelse(i<0,NA,i),
i = ifelse(i>100,NA,i)
%>%
) mutate(val = ifelse(val=="No Added", val, "Added"))
<- dat.f3b %>%
f3b ggplot() +
geom_sf(aes(fill=i)) +
scale_fill_continuous_sequential(palette="blues", na="white", trans="pseudo_log",
breaks = c(1,3,8,15,30), labels = c("No \nadded","3","8","15","30")) + labs(fill = "Added value: MAE(diff) \n ") +
theme_few(base_size = 20) +
theme(legend.position = "top",
panel.spacing = unit(2, "lines"),
legend.text = element_text(size = 10)) +
facet_wrap(.~type)
library(cowplot)
<- plot_grid(f3a,f3b, nrow = 2, labels = c("A)","B)"), label_size=30)) (figure4
5.6 MAE: Dumbbell plot
# P. Falciparum
<-dat.rev.vf.cplt
dat2 <-test_pf_7_mae[[1]]
full <-test_pf_7_mae[[2]]
model1<-test_pf_7_mae[[3]]
model2<-test_pf_7_mae[[4]]
model3
$fit.full <- full$summary.fitted.values$`0.5quant`
dat2$fit.m1 <- model1$summary.fitted.values$`0.5quant`
dat2$fit.m2 <- model2$summary.fitted.values$`0.5quant`
dat2$fit.m3 <- model3$summary.fitted.values$`0.5quant`
dat2
length(dat2$fit.full)
#variables extra que al final no se usaron (se preservan para ver su equivalente en la f(x))
<- dat2$NOMBDIST
id2 <-dat2$falciparum
var1
<- dat2 %>%
rmse mutate(r_full = abs(falciparum-fit.full),
r_m1 = abs(falciparum-fit.m1),
r_m2 = abs(falciparum-fit.m2),
r_m3 = abs(falciparum-fit.m3)) %>%
group_by(NOMBDIST) %>%
summarise(rmse_full = mean(r_full, na.rm = T),
rmse_m1 = mean(r_m1, na.rm = T),
rmse_m2 = mean(r_m2, na.rm = T),
rmse_m3 = mean(r_m3, na.rm = T))
colnames(rmse)<-c("District","Full","climate","Malaria-Control","Deforestation")
<- ggplot() +
falciparum.dumbble#grafico de puntos primera geometria
#el primer geoma determina el orden de los distritos
geom_segment(
data = gather(rmse, measure, value, -District) %>%
group_by(District) %>%
summarise(start = range(value)[1], end = range(value)[2]) %>%
ungroup(),
aes(x = start, xend = end, y = reorder(District, rmse[[2]], mean), # a ordenar/valor por el cual ordenar/extra. rmse[[2]] es el Full
yend = reorder(District, end, mean)),color = "grey20", size = 0.5)+
#puntos
geom_point(data = gather(rmse, measure, value, -District),
aes(value,reorder(District, value, mean) , color = measure), #District
size = 4,alpha=0.45)+
scale_color_npg(palette = c("nrc"), alpha = 0.2, name="Variable set",
limits=c("Full","climate","Deforestation","Malaria-Control"))+
theme(legend.position = "top",
panel.background = element_blank(),
legend.key = element_rect(fill = "white"),
panel.grid.major.x = element_blank() ,
# explicitly set the horizontal lines (or they will disappear too)
panel.grid.major.y = element_line( size=.05, color="darkgray" ) )+
scale_x_continuous(limits = c(0, 250)) +
xlab("Mean Absolute Error") +
ylab("District")
falciparum.dumbble
<-dat.rev.vf.cplt
dat2
<-test_pv_8_mae[[4]]
fullv <-test_pv_8_mae[[1]] # clima
model1v<-test_pv_8_mae[[2]] # Malaria-Control
model2v<-test_pv_8_mae[[3]] # Deforestation
model3v
$fit.fullv <- fullv$summary.fitted.values$`0.5quant`
dat2$fit.m1v <- model1v$summary.fitted.values$`0.5quant`
dat2$fit.m2v <- model2v$summary.fitted.values$`0.5quant`
dat2$fit.m3v <- model3v$summary.fitted.values$`0.5quant`
dat2
length( dat2$fit.fullv)
#variables extra que al final no se usaron (se preservan para ver su equivalente en la f(x))
<- dat2$NOMBDIST
id2
<- dat2 %>%
rmsev mutate(r_fullv = abs(vivax-fit.fullv),
r_m1v = abs(vivax-fit.m1v),
r_m2v = abs(vivax-fit.m2v),
r_m3v = abs(vivax-fit.m3v)) %>%
group_by(NOMBDIST) %>%
summarise(rmse_fullv = mean(r_fullv, na.rm = T),
rmse_m1v = mean(r_m1v, na.rm = T),
rmse_m2v = mean(r_m2v, na.rm = T),
rmse_m3v = mean(r_m3v, na.rm = T))
colnames(rmsev)<-c("District","Full","climate","Malaria-Control","Deforestation")
<- ggplot() +
vivax.dumbble#grafico de puntos primera geometria
#el primer geoma determina el orden de los distritos
geom_segment(
data = gather(rmsev, measure, value, -District) %>%
group_by(District) %>%
summarise(start = range(value)[1], end = range(value)[2]) %>%
ungroup(),
aes(x = start, xend = end, y = reorder(District, rmsev[[2]], mean), # a ordenar/valor por el cual ordenar/extra. rmse[[2]] es el Full
yend = reorder(District, end, mean)),color = "grey20", size = 0.5)+
#puntos
geom_point(data = gather(rmsev, measure, value, -District),
aes(value,reorder(District, value, mean) , color = measure), #District
size = 4,alpha=0.45)+
scale_color_npg(palette = c("nrc"), alpha = 0.2, name="Variable set",
limits=c("Full","climate","Deforestation","Malaria-Control"))+
theme(legend.position = "top",
panel.background = element_blank(),
legend.key = element_rect(fill = "white"),
panel.grid.major.x = element_blank() ,
# explicitly set the horizontal lines (or they will disappear too)
panel.grid.major.y = element_line( size=.05, color="darkgrey" ) )+
scale_x_continuous(limits = c(0, 250)) +
xlab("Mean Absolute Error") +
ylab("District")
vivax.dumbble
library(cowplot)
<-plot_grid(vivax.dumbble,falciparum.dumbble, ncol=2, labels = c("A) P.vivax ", "B) P. falciparum"), hjust = -0.05)) (rm_seasonal_d
5.7 Dumbbell plot and Spatial heterogeneity of covariates effects in terms of mean absolute error
library(colorspace)
library(sf)
library(ggthemes)
library(Hmisc)
library(cowplot)
##############################################################################
# Dumbbell plot
##############################################################################
# P. Falciparum
<-dat.rev.vf.cplt
dat2 <-test_pf_7_mae[[1]]
full <-test_pf_7_mae[[2]]
model1<-test_pf_7_mae[[3]]
model2<-test_pf_7_mae[[4]]
model3
$fit.full <- full$summary.fitted.values$`0.5quant`
dat2$fit.m1 <- model1$summary.fitted.values$`0.5quant`
dat2$fit.m2 <- model2$summary.fitted.values$`0.5quant`
dat2$fit.m3 <- model3$summary.fitted.values$`0.5quant`
dat2
length(dat2$fit.full)
#variables extra que al final no se usaron (se preservan para ver su equivalente en la f(x))
<- dat2$NOMBDIST
id2 <-dat2$falciparum
var1
<- dat2 %>%
rmse mutate(r_full = abs(falciparum-fit.full),
r_m1 = abs(falciparum-fit.m1),
r_m2 = abs(falciparum-fit.m2),
r_m3 = abs(falciparum-fit.m3)) %>%
group_by(NOMBDIST) %>%
summarise(rmse_full = mean(r_full, na.rm = T),
rmse_m1 = mean(r_m1, na.rm = T),
rmse_m2 = mean(r_m2, na.rm = T),
rmse_m3 = mean(r_m3, na.rm = T))
colnames(rmse)<-c("District","Full","climate","Malaria-Control","Deforestation")
<- c("#E64B35B2","#4DBBD5B2","#00A087B2","#3C5488B2")
colfunc
<- rmse %>%
rmse2 arrange(desc(Full)) %>%
head(n = 10)
= gather(rmse2, measure, value, -District)
datapoint
<- ggplot() +
falciparum.dumbble#grafico de puntos primera geometria
#el primer geoma determina el orden de los distritos
geom_segment(
data = gather(rmse2, measure, value, -District) %>%
group_by(District) %>%
summarise(start = range(value)[1], end = range(value)[2]) %>%
ungroup(),
aes(x = start,
xend = end,
y = reorder(District, end, mean),
yend = reorder(District, end, mean)),
color = "grey20", size = 0.5)+ #puntos
geom_point(data = gather(rmse2, measure, value, -District),
aes(value,reorder(District, value, mean),
shape = measure,
color = measure), #District
size = 4,alpha=0.45)+
theme(legend.position = "none")+
theme(plot.margin = unit(c(3,1,3,1), "lines"), legend.position="none")+
scale_shape_manual(values=c(15,16,17,18),
name="Variable set",
limits=c("Full","climate","Deforestation","Malaria-Control"))+
scale_color_manual(name="Variable set",
limits=c("Full","climate","Deforestation","Malaria-Control"),
values = c("Full" = colfunc[1],
"climate" = colfunc[2],
"Deforestation" = colfunc[3],
"Malaria-Control" = colfunc[4])) +
theme(legend.position = "top",
panel.background = element_blank(),
legend.key = element_rect(fill = "white"),
panel.grid.major.x = element_blank(),
# explicitly set the horizontal lines (or they will disappear too)
panel.grid.major.y = element_line( size=.05, color="darkgrey"))+
theme(panel.border = element_rect(fill = NA, color = "black", size = 1))+
scale_x_continuous(limits = c(0, 250)) +
xlab("Mean Absolute Error") +
ylab("District")
falciparum.dumbble
<-dat.rev.vf.cplt
dat2
<-test_pv_8_mae[[4]]
fullv <-test_pv_8_mae[[1]] # clima
model1v<-test_pv_8_mae[[2]] # Malaria-Control
model2v<-test_pv_8_mae[[3]] # Deforestation
model3v
$fit.fullv <- fullv$summary.fitted.values$`0.5quant`
dat2$fit.m1v <- model1v$summary.fitted.values$`0.5quant`
dat2$fit.m2v <- model2v$summary.fitted.values$`0.5quant`
dat2$fit.m3v <- model3v$summary.fitted.values$`0.5quant`
dat2
length( dat2$fit.fullv)
#variables extra que al final no se usaron (se preservan para ver su equivalente en la f(x))
<- dat2$NOMBDIST
id2
<- dat2 %>%
rmsev mutate(r_fullv = abs(vivax-fit.fullv),
r_m1v = abs(vivax-fit.m1v),
r_m2v = abs(vivax-fit.m2v),
r_m3v = abs(vivax-fit.m3v)) %>%
group_by(NOMBDIST) %>%
summarise(rmse_fullv = mean(r_fullv, na.rm = T),
rmse_m1v = mean(r_m1v, na.rm = T),
rmse_m2v = mean(r_m2v, na.rm = T),
rmse_m3v = mean(r_m3v, na.rm = T))
colnames(rmsev)<-c("District","Full","climate","Malaria-Control","Deforestation")
<- rmsev %>%
rmsev2 arrange(desc(Full)) %>%
head(n = 10)
<- ggplot() +
vivax.dumbble#grafico de puntos primera geometria
#el primer geoma determina el orden de los distritos
geom_segment(
data = gather(rmsev2, measure, value, -District) %>%
group_by(District) %>%
summarise(start = range(value)[1], end = range(value)[2]) %>%
ungroup(),
aes(x = start, xend = end, y = reorder(District, end, mean),
yend = reorder(District, end, mean)),color = "grey20", size = 0.5)+ #puntos
geom_point(data = gather(rmsev2, measure, value, -District),
aes(value,reorder(District, value, mean),
shape = measure,
color = measure), #District
size = 4,alpha=0.45)+
theme(legend.position = "none")+#geom_text(show.legend = FALSE)+
theme(plot.margin = unit(c(3,1,3,1), "lines"), legend.position="none")+
scale_shape_manual(values=c(15,16,17,18),
name="Variable set",
limits=c("Full","climate","Deforestation","Malaria-Control"))+
scale_color_manual(name="Variable set",
limits=c("Full","climate","Deforestation","Malaria-Control"),
values = c("Full" = colfunc[1],
"climate" = colfunc[2],
"Deforestation" = colfunc[3],
"Malaria-Control" = colfunc[4])) +
theme(legend.position = "top",
panel.background = element_blank(),
legend.key = element_rect(fill = "white"),
panel.grid.major.x = element_blank(),
# explicitly set the horizontal lines (or they will disappear too)
panel.grid.major.y = element_line( size=.05, color="darkgrey"))+
theme(panel.border = element_rect(fill = NA, color = "black", size = 1))+
scale_x_continuous(limits = c(0, 250)) +
xlab("Mean Absolute Error") +
ylab("District")
vivax.dumbble
##############################################################################
# Spatial heterogeneity of covariates effects in terms of mean absolute error
##############################################################################
<-dat %>%
datmutate(q_std =((q - mean(q,na.rm=T)) / sd(q,na.rm=T)),
aet_std =((aet - mean(aet,na.rm=T)) / sd(aet,na.rm=T)),
soilm_std =((soilm - mean(soilm,na.rm=T)) / sd(soilm,na.rm=T)),
prcp_day_std =(((prcp/30) - mean((prcp/30),na.rm=T)) / sd((prcp/30),na.rm=T)),
tmax_std =((tmax - mean(tmax,na.rm=T)) / sd(tmax,na.rm=T)),
tmin_std =((tmin - mean(tmin,na.rm=T)) / sd(tmin,na.rm=T)),
cum_loss_km2_std =((cum_loss_km2 - mean(cum_loss_km2,na.rm=T)) / sd(cum_loss_km2,na.rm=T)),
water_deficit_std =((water_deficit - mean(water_deficit,na.rm=T)) / sd(water_deficit,na.rm=T)))
<- dat %>%
datgroup_by(NOMBDIST) %>%
mutate(workers_lag_12=Lag(workers,+12),
nets_lag_12=Lag(nets,+12),
n_eess_lag_12=Lag(n_eess,+12),
enviro_lag_12=Lag(enviro,+12),
cum_loss_km2_std_lag_12=Lag(cum_loss_km2_std,+12),
soilm_std_lag1=Lag(soilm_std,+1),
q_std_lag1=Lag(q_std,+1),
aet_std_lag1=Lag(aet_std,+1),
tmax_std_lag1=Lag(tmax_std,+1),
tmin_std_lag1=Lag(tmin_std,+1),
prcp_day_std_lag1=Lag(prcp_day_std,+1),
water_deficit_std_lag1=Lag(water_deficit_std,+1))
<-dat %>%
dat.rev.vf::select(NOMBDIST,vivax,falciparum,index,year,month2,
dplyr
prcp_day_std,prcp_day_std_lag1,tmax_std,tmax_std_lag1,
cum_loss_km2_std,
n_eess,workers,enviro,nets,
n_eess_lag_12, workers_lag_12, enviro_lag_12,
nets_lag_12,pop2015,water_deficit_std,water_deficit_std_lag1,
soilm_std,aet_std,q_std,tmin_std,
soilm_std_lag1,aet_std_lag1,q_std_lag1,tmin_std_lag1)
<-dat.rev.vf[complete.cases(dat.rev.vf),]
dat.rev.vf.cplt
###########################################
# P. Vivax
###########################################
<- c(
pv_8.ma
# clima
~ 1 + f(index, model = "bym", graph = "map.graph") +
vivax f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12,
n_eess_lag_12
# control-malaria
~ 1 + f(index, model = "bym", graph = "map.graph") +
vivax f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
f(inla.group(aet_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# deforestacion
~ 1 + f(index, model = "bym", graph = "map.graph") +
vivax f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1"),
# full
~ 1 + f(index, model = "bym", graph = "map.graph") +
vivax f(year, model = "iid") + f(month2, model = "rw2") +
f(inla.group(prcp_day_std_lag1), model = "rw1") + f(inla.group(tmax_std),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(aet_std_lag1), model = "rw1") + f(inla.group(q_std),
model = "rw1")
)
###########################################
# P. Falciparum
###########################################
<-c(
pf_7.ma#Full model
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
+ workers_lag_12 + enviro_lag_12 + nets_lag_12 +
n_eess_lag_12 f(inla.group(q_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
#clima
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(cum_loss_km2_std), model = "rw1") + n_eess_lag_12 +
+ enviro_lag_12 + nets_lag_12,
workers_lag_12
#controles malaria
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + f(inla.group(cum_loss_km2_std), model = "rw1") +
f(inla.group(q_std_lag1), model = "rw1") + f(inla.group(aet_std_lag1),
model = "rw1"),
#deforestacion
formula = falciparum ~ 1 + f(index, model = "bym", graph = "map.graph") +
f(year, model = "iid") + f(month2, model = "rw1") +
f(inla.group(prcp_day_std), model = "rw1") + f(inla.group(tmax_std_lag1),
model = "rw1") + n_eess_lag_12 + workers_lag_12 + enviro_lag_12 +
+ f(inla.group(q_std_lag1), model = "rw1") +
nets_lag_12 f(inla.group(aet_std_lag1), model = "rw1")
)
# P. Vivax ##############################
<-plot_mae2(dat1 = dat.rev.vf.cplt, var = vivax, full = test_pv_8_mae[[4]],
f3_amodel1 = test_pv_8_mae[[1]], model2 = test_pv_8_mae[[2]], model3 = test_pv_8_mae[[3]],
map = area.sf, id = NOMBDIST)
<- f3_a[[3]] %>%
dat.f3a ::select(NOMBDIST, m1:m3, i1:i3) %>%
dplyr::rename(climate_val=m1, `malaria-control_val`=m2, deforestation_val=m3,
dplyrclimate_i=i1, `malaria-control_i`=i2, deforestation_i=i3) %>%
gather(type, val, climate_val:deforestation_i) %>%
separate(type, into = c("type","i"), sep = "_") %>%
spread(i,val) %>%
mutate(i = as.numeric(i),
# i = ifelse(i<0,NA,i),
i = ifelse(i>100,NA,i)
%>%
) mutate(val = ifelse(val=="No Added", val, "Added"))
<- dat.f3a %>%
f3a ggplot() +
geom_sf(aes(fill=i)) +
# scale_fill_continuous_sequential(palette="blues", na="white",
# trans="pseudo_log",
# breaks = c(1,3,8,15,30),
# labels = c("No \nadded","3","8","15","30")) +
scale_fill_gradient2(low = "red3", mid = "white", high = "#18517C", #na="#18517C",
midpoint = 0, aesthetics = "fill", trans="pseudo_log",
breaks = c(-11,0,32))+
# scale_colour_brewer(palette="RdBu", na="white",
# trans="pseudo_log",
# breaks = c(1,3,8,15,30),
# labels = c("No \nadded","3","8","15","30")) +
labs(fill = "MAE(diff) \n ") +
theme_few(base_size = 20) +
theme(legend.position = "right",
panel.spacing = unit(2, "lines"),
legend.text = element_text(size = 10)) +
theme(panel.border = element_rect(fill = NA, color = "black", size = 1))+
facet_wrap(.~type)
# f3a
# P. Falciparum ##############################
<-plot_mae2(dat1 = dat.rev.vf.cplt, var = falciparum, full = test_pf_7_mae[[1]],
f3_bmodel1 = test_pf_7_mae[[2]], model2 = test_pf_7_mae[[3]], model3 = test_pf_7_mae[[4]],
map = area.sf, id = NOMBDIST)
<- f3_b[[3]] %>%
dat.f3b ::select(NOMBDIST, m1:m3, i1:i3) %>%
dplyr::rename(climate_val=m1, `malaria-control_val`=m2, deforestation_val=m3,
dplyrclimate_i=i1, `malaria-control_i`=i2, deforestation_i=i3) %>%
gather(type, val, climate_val:deforestation_i) %>%
separate(type, into = c("type","i"), sep = "_") %>%
spread(i,val) %>%
mutate(i = as.numeric(i),
# i = ifelse(i<0,NA,i),
i = ifelse(i>100,NA,i)
%>%
) mutate(val = ifelse(val=="No Added", val, "Added"))
library(RColorBrewer)
<- dat.f3b %>%
f3b ggplot() +
geom_sf(aes(fill=i)) +
# scale_fill_continuous_sequential(palette="blues", na="white",
# trans="pseudo_log",
# breaks = c(1,3,8,15,30),
# labels = c("No \nadded","3","8","15","30")) +
scale_fill_gradient2(low = "red3", mid = "white", high = "#18517C", #na="#18517C",
midpoint = 0, aesthetics = "fill", trans="pseudo_log",
breaks = c(-11,0,32))+
# scale_colour_brewer(palette="RdBu", na="white",
# trans="pseudo_log",
# breaks = c(1,3,8,15,30),
# labels = c("No \nadded","3","8","15","30")) +
labs(fill = "MAE(diff) \n ") +
theme_few(base_size = 20) +
theme(legend.position = "right",
panel.spacing = unit(2, "lines"),
legend.text = element_text(size = 10)) +
theme(panel.border = element_rect(fill = NA, color = "black", size = 1))+
facet_wrap(.~type)
# f3b
##############################################################################
# Final Figure
<-plot_grid(vivax.dumbble,f3a,falciparum.dumbble,f3b, ncol=2, nrow=2, labels = c("A) P. Vivax ", "", "B) P. Falciparum", ""), hjust = -0.05, label_size=17, rel_widths = c(1,2))) (dfigure
5.8 Supplementary Figure 7: Nonlinear effects
5.8.1 Figure 7.1
<- function(model, lab1 = NULL, scaled = NULL,
plot_random2_ver3 scaled_vars = 1,
analysis_vars = unique(mydata$var),
scaled_means = NULL,
scaled_sds = NULL,
y_lab = "Incidence Rate Ratio (IRR)",
name="", vars = NULL) {
print("Deprecated, update to plot_random3")
<- summary(model)
summ <- scaled_vars
a <- scaled_means
b <- scaled_sds
c
if(is.null(scaled)) {
{<- model$summary.random %>% bind_rows( .id = "var") %>% filter(var!="index")}
mydata else{
<- model$summary.random %>% bind_rows( .id = "var") %>%
mydata filter(var %in% scaled_vars)
names(scaled_sds)<-scaled_vars
names(scaled_means)<-scaled_vars
$ID<-(mydata$ID * scaled_sds[mydata$var]) + scaled_means[mydata$var]
mydata
<- mydata %>% # no estaba enviando esta operacion a ningun lado
mydata bind_rows(model$summary.random %>% bind_rows( .id = "var") %>%
filter(var!="index", !var %in% scaled_vars)) %>% filter(var %in% analysis_vars)
}
}
library(ggthemes)
<- lab1
lab2
if(!is.null(vars)) {mydata <- mydata %>% dplyr::filter(var %in% vars)}
# !is.null(vars) no se activará por defecto pues vars es NULL
if(!is.null(lab1)) {names(lab2) <- mydata %>% arrange(var) %>% distinct(var) %>% unlist()}
<- scaled_vars
new_order <- arrange(transform(mydata, var = factor(var, levels = new_order)), var)
mydata2 <- colnames(mydata)
mydata_names colnames(mydata2) <- mydata_names
levels(mydata2$var) <- lab2
<- mydata2 %>% ggplot(aes(x = ID, y = exp(`0.5quant`))) +
plotgeom_ribbon(aes(ymin = exp(`0.025quant`), ymax = exp(`0.975quant`)), fill="grey90", size=.3, alpha = .6) +
geom_line(color = "firebrick") +
scale_x_continuous(expand=c(0,0)) +
geom_hline(aes(yintercept = 1), col="black", linetype="dashed", size=.4) +
labs(title=name, x="", y=y_lab) +
theme_base() +
theme(plot.background = element_blank(),
strip.placement = "outside") +
if(!is.null(lab1)) {facet_wrap(.~var, scales = "free", strip.position = "bottom")}
{else{facet_wrap(.~var, scales = "free", strip.position = "bottom")}
}
return(plot)
}
# P. Vivax
<- test_pv_8.3_back_2[[5]] %>%
sv8a plot_random2_ver3(lab1 = c("Avg. Precipitation\n (mm) lag", "Tmax (ºC)","Cum deforest x 100 km2",
"Evapotranspiration\n (mm) lag", "Runoff (mm)"),
scaled = T,
analysis_vars = c("inla.group(prcp_day_std_lag1)","inla.group(tmax_std)",
"inla.group(cum_loss_km2_std)", "inla.group(aet_std_lag1)", "inla.group(q_std)"),
scaled_vars = c("inla.group(prcp_day_std_lag1)","inla.group(tmax_std)",
"inla.group(cum_loss_km2_std)", "inla.group(aet_std_lag1)", "inla.group(q_std)"),
scaled_means = c(mean(dat$prcp/30, na.rm=T),mean(dat$tmax, na.rm=T),
mean(dat$cum_loss_km2, na.rm=T), mean(dat$aet, na.rm=T), mean(dat$q, na.rm=T)),
scaled_sds = c(sd(dat$prcp/30, na.rm=T),sd(dat$tmax, na.rm=T),sd(dat$cum_loss_km2, na.rm=T),
sd(dat$aet, na.rm=T), sd(dat$q, na.rm=T))
)
#lab1,scaled_vars, deben tener el mismo orden
# P. Falciparum
<- test_pf_7_back_3[[5]] %>%
sf8b plot_random2_ver3(lab1 = c("Avg. Precipitation (mm)", "Tmax (ºC) lag","Cum deforest x 100 km2",
"Evapotranspiration\n (mm) lag", "Runoff (mm) lag"),
scaled = T,
analysis_vars = c("inla.group(prcp_day_std)","inla.group(tmax_std_lag1)",
"inla.group(cum_loss_km2_std)", "inla.group(aet_std_lag1)", "inla.group(q_std_lag1)"),
scaled_vars = c("inla.group(prcp_day_std)","inla.group(tmax_std_lag1)",
"inla.group(cum_loss_km2_std)", "inla.group(aet_std_lag1)", "inla.group(q_std_lag1)"),
scaled_means = c(mean(dat$prcp/30, na.rm=T),mean(dat$tmax, na.rm=T),
mean(dat$cum_loss_km2, na.rm=T), mean(dat$aet, na.rm=T), mean(dat$q, na.rm=T)),
scaled_sds = c(sd(dat$prcp/30, na.rm=T),sd(dat$tmax, na.rm=T),sd(dat$cum_loss_km2, na.rm=T),
sd(dat$aet, na.rm=T), sd(dat$q, na.rm=T))
)
library(cowplot)
<- plot_grid(sv8a, sf8b, labels = c("A) P. Vivax","B) P. Falciparum"), hjust = -0.05, ncol = 1)) (sf8
5.8.2 Figure 7.2
<- function(model, lab1 = NULL, scaled = NULL,
plot_random2_ver4 scaled_vars = 1,
analysis_vars = unique(mydata$var),
scaled_means = NULL,
scaled_sds = NULL,
y_lab = "Log (IR)",
name="", vars = NULL) {
print("Deprecated, update to plot_random3")
<- summary(model)
summ <- scaled_vars
a <- scaled_means
b <- scaled_sds
c
if(is.null(scaled)) {
{<- model$summary.random %>% bind_rows( .id = "var") %>% filter(var!="index")}
mydata else{
<- model$summary.random %>% bind_rows( .id = "var") %>%
mydata filter(var %in% scaled_vars)
names(scaled_sds)<-scaled_vars
names(scaled_means)<-scaled_vars
$ID<-(mydata$ID * scaled_sds[mydata$var]) + scaled_means[mydata$var]
mydata
<- mydata %>% # no estaba enviando esta operacion a ningun lado
mydata bind_rows(model$summary.random %>% bind_rows( .id = "var") %>%
filter(var!="index", !var %in% scaled_vars)) %>% filter(var %in% analysis_vars)
}
}
library(ggthemes)
<- lab1
lab2
if(!is.null(vars)) {mydata <- mydata %>% dplyr::filter(var %in% vars)}
# !is.null(vars) no se activará por defecto pues vars es NULL
if(!is.null(lab1)) {names(lab2) <- mydata %>% arrange(var) %>% distinct(var) %>% unlist()}
<- scaled_vars
new_order <- arrange(transform(mydata, var = factor(var, levels = new_order)), var)
mydata2 <- colnames(mydata)
mydata_names colnames(mydata2) <- mydata_names
levels(mydata2$var) <- lab2
<- mydata2 %>% ggplot(aes(x = ID, y = `0.5quant`)) +
plotgeom_ribbon(aes(ymin = `0.025quant`, ymax = `0.975quant`), fill="grey90", size=.3, alpha = .6) +
geom_line(color = "firebrick") +
scale_x_continuous(expand=c(0,0)) +
geom_hline(aes(yintercept = 0), col="black", linetype="dashed", size=.4) +
labs(title=name, x="", y=y_lab) +
theme_base() +
theme(plot.background = element_blank(),
strip.placement = "outside") +
if(!is.null(lab1)) {facet_wrap(.~var, scales = "free", strip.position = "bottom")}
{else{facet_wrap(.~var, scales = "free", strip.position = "bottom")}
}
return(plot)
}
# P. Vivax
<- test_pv_8.3_back_2[[5]] %>%
sv8a plot_random2_ver4(lab1 = c("Avg. Precipitation\n (mm) lag", "Tmax (ºC)","Cum deforest x 100 km2",
"Evapotranspiration\n (mm) lag", "Runoff (mm)"),
scaled = T,
analysis_vars = c("inla.group(prcp_day_std_lag1)","inla.group(tmax_std)",
"inla.group(cum_loss_km2_std)", "inla.group(aet_std_lag1)", "inla.group(q_std)"),
scaled_vars = c("inla.group(prcp_day_std_lag1)","inla.group(tmax_std)",
"inla.group(cum_loss_km2_std)", "inla.group(aet_std_lag1)", "inla.group(q_std)"),
scaled_means = c(mean(dat$prcp/30, na.rm=T),mean(dat$tmax, na.rm=T),
mean(dat$cum_loss_km2, na.rm=T), mean(dat$aet, na.rm=T), mean(dat$q, na.rm=T)),
scaled_sds = c(sd(dat$prcp/30, na.rm=T),sd(dat$tmax, na.rm=T),sd(dat$cum_loss_km2, na.rm=T),
sd(dat$aet, na.rm=T), sd(dat$q, na.rm=T))
)
#lab1,scaled_vars, deben tener el mismo orden
# P. Falciparum
<- test_pf_7_back_3[[5]] %>%
sf8b plot_random2_ver4(lab1 = c("Avg. Precipitation (mm)", "Tmax (ºC) lag","Cum deforest x 100 km2",
"Evapotranspiration\n (mm) lag", "Runoff (mm) lag"),
scaled = T,
analysis_vars = c("inla.group(prcp_day_std)","inla.group(tmax_std_lag1)",
"inla.group(cum_loss_km2_std)", "inla.group(aet_std_lag1)", "inla.group(q_std_lag1)"),
scaled_vars = c("inla.group(prcp_day_std)","inla.group(tmax_std_lag1)",
"inla.group(cum_loss_km2_std)", "inla.group(aet_std_lag1)", "inla.group(q_std_lag1)"),
scaled_means = c(mean(dat$prcp/30, na.rm=T),mean(dat$tmax, na.rm=T),
mean(dat$cum_loss_km2, na.rm=T), mean(dat$aet, na.rm=T), mean(dat$q, na.rm=T)),
scaled_sds = c(sd(dat$prcp/30, na.rm=T),sd(dat$tmax, na.rm=T),sd(dat$cum_loss_km2, na.rm=T),
sd(dat$aet, na.rm=T), sd(dat$q, na.rm=T))
)
library(cowplot)
<- plot_grid(sv8a, sf8b, labels = c("A) P. Vivax","B) P. Falciparum"), hjust = -0.05, ncol = 1)) (sf8
5.9 Combine plot
5.9.1 Combine plot 1
<-function(model, label = id, col1="black", dire=-1, breaks, lab_mod, lim, title, legend=NULL, filter, ylab = "Incidence Rate Ratio (IRR)", ylim = 10, angle=45, hjust = 1, xlabs=lim, b.size=20, flip=F) {
plot_fixed_ver2library(ggsci)
<- enquo(label)
label
<- function(model) {
extract_dat <- model$summary.fixed %>%
mydata rownames_to_column(var = "var")
return(mydata)
}
<- data.frame(var=NA)
dat_na
<- possibly(extract_dat, otherwise = dat_na)
extract_dat.safe
<- model %>% purrr::map(~extract_dat.safe(model=.)) %>%
qqq bind_rows(.id = "formula") %>%
mutate(id = match(formula, unique(formula))) %>%
filter(!is.na(`0.025quant`), `0.5quant`<filter) %>%
ggplot(aes(x = var, y = exp(`0.5quant`), col=factor(id))) +
geom_point(position = position_dodge(0.3)) +
geom_errorbar(aes(ymin = exp(`0.025quant`), ymax = exp(`0.975quant`)), width=.1, position = position_dodge(0.3)) +
geom_hline(aes(yintercept = 1), col=col1, linetype="dashed", size=.4) +
::scale_color_npg(palette = c("nrc"),name="Models", breaks=breaks, labels=lab_mod) +
ggsciscale_x_discrete(limits=lim, labels = xlabs) +
ylim(0, ylim) +
if(!is.null(legend)) {guides(color = legend)}} +
{labs(title=title, x = "variables") +
theme_bw(base_size = b.size) +
labs(y=ylab) +
if(isTRUE(flip)) {coord_flip()}} +
{theme(axis.text.x = element_text(angle = angle, hjust = hjust)
legend.position = "bottom",
,legend.box = "vertical")+
guides(col=guide_legend(nrow=2,byrow=TRUE))
return(qqq)
}
<- possibly(plot_fixed_ver2, otherwise = NA_real_)
plot_fixed_ver2.safe
#personalize plot ##########################################################
<- function(model, lab1 = NULL, scaled = NULL,
plot_random2_ver3 scaled_vars = 1,
analysis_vars = unique(mydata$var),
scaled_means = NULL,
scaled_sds = NULL,
y_lab = "Incidence Rate Ratio (IRR)",
name="", vars = NULL) {
print("Deprecated, update to plot_random3")
<- summary(model)
summ <- scaled_vars
a <- scaled_means
b <- scaled_sds
c
if(is.null(scaled)) {
{<- model$summary.random %>% bind_rows( .id = "var") %>% filter(var!="index")}
mydata else{
<- model$summary.random %>% bind_rows( .id = "var") %>%
mydata filter(var %in% scaled_vars)
names(scaled_sds)<-scaled_vars
names(scaled_means)<-scaled_vars
$ID<-(mydata$ID * scaled_sds[mydata$var]) + scaled_means[mydata$var]
mydata
<- mydata %>% # no estaba enviando esta operacion a ningun lado
mydata bind_rows(model$summary.random %>% bind_rows( .id = "var") %>%
filter(var!="index", !var %in% scaled_vars)) %>% filter(var %in% analysis_vars)
}
}
library(ggthemes)
<- lab1
lab2
if(!is.null(vars)) {mydata <- mydata %>% dplyr::filter(var %in% vars)}
# !is.null(vars) no se activará por defecto pues vars es NULL
if(!is.null(lab1)) {names(lab2) <- mydata %>% arrange(var) %>% distinct(var) %>% unlist()}
<- scaled_vars
new_order <- arrange(transform(mydata, var = factor(var, levels = new_order)), var)
mydata2 <- colnames(mydata)
mydata_names colnames(mydata2) <- mydata_names
levels(mydata2$var) <- lab2
<- mydata2 %>% ggplot(aes(x = ID, y = exp(`0.5quant`))) +
plotgeom_ribbon(aes(ymin = exp(`0.025quant`), ymax = exp(`0.975quant`)), fill="grey90", size=.3, alpha = .6) +
geom_line(color = "firebrick") +
scale_x_continuous(expand=c(0,0)) +
geom_hline(aes(yintercept = 1), col="black", linetype="dashed", size=.4) +
labs(title=name, x="", y=y_lab) +
theme_base() +
theme(plot.background = element_blank(),
strip.placement = "outside") +
if(!is.null(lab1)) {facet_wrap(.~var, scales = "free", strip.position = "bottom")}
{else{facet_wrap(.~var, scales = "free", strip.position = "bottom")}
}
return(plot)
}#############################################################################
#cp:combine plot
<- test_pv_8.3_back_2[c(5)] %>%
sv_7_pv_cp plot_fixed_ver2.safe(title = " ",
filter=10,
legend = F,
ylim = 6,
angle = 0,
hjust = .5,
lim = c("workers_lag_12","nets_lag_12",
"n_eess_lag_12","enviro_lag_12"),
xlab = c("Lag of workers","Lag of nets","Lag of hfd","Lag of enviro"),
breaks=c("1","2"),
lab_mod=c("Full model",
""),
flip=T) +
theme(plot.margin = unit(c(1,1,1,1), "lines"), legend.position="none")
<- test_pv_8.3_back_2[[5]] %>%
sv8a_cp plot_random2_ver3(lab1 = c("Avg. Precipitation\n (mm) lag", "Tmax (ºC)","Cum deforest x 100 km2",
"Evapotranspiration\n (mm) lag", "Runoff (mm)"),
scaled = T,
analysis_vars = c("inla.group(prcp_day_std_lag1)","inla.group(tmax_std)",
"inla.group(cum_loss_km2_std)", "inla.group(aet_std_lag1)", "inla.group(q_std)"),
scaled_vars = c("inla.group(prcp_day_std_lag1)","inla.group(tmax_std)",
"inla.group(cum_loss_km2_std)", "inla.group(aet_std_lag1)", "inla.group(q_std)"),
scaled_means = c(mean(dat$prcp/30, na.rm=T),mean(dat$tmax, na.rm=T),
mean(dat$cum_loss_km2, na.rm=T), mean(dat$aet, na.rm=T), mean(dat$q, na.rm=T)),
scaled_sds = c(sd(dat$prcp/30, na.rm=T),sd(dat$tmax, na.rm=T),sd(dat$cum_loss_km2, na.rm=T),
sd(dat$aet, na.rm=T), sd(dat$q, na.rm=T))
)
<- plot_grid(sv_7_pv_cp,sv8a_cp, labels = c("A) P. Vivax Fixed effects and Random effects"), hjust = -0.05, ncol = 2,nrow=1)
sfcp_1
<- test_pf_7_back_3[c(5)] %>%
sv_7_pf_cp plot_fixed_ver2.safe(title = " ",
filter=10,
legend = F,
ylim = 6,
angle = 0,
hjust = .5,
lim = c("workers_lag_12","nets_lag_12",
"n_eess_lag_12","enviro_lag_12"),
xlab = c("Lag of workers","Lag of nets","Lag of hfd","Lag of enviro"),
breaks=c("1","2"),
lab_mod=c("Full model",
""),
flip=T) +
theme(plot.margin = unit(c(1,1,1,1), "lines"), legend.position="none")
<- test_pf_7_back_3[[5]] %>%
sv8bf_cp plot_random2_ver3(lab1 = c("Avg. Precipitation (mm)", "Tmax (ºC) lag","Cum deforest x 100 km2",
"Evapotranspiration\n (mm) lag", "Runoff (mm) lag"),
scaled = T,
analysis_vars = c("inla.group(prcp_day_std)","inla.group(tmax_std_lag1)",
"inla.group(cum_loss_km2_std)", "inla.group(aet_std_lag1)", "inla.group(q_std_lag1)"),
scaled_vars = c("inla.group(prcp_day_std)","inla.group(tmax_std_lag1)",
"inla.group(cum_loss_km2_std)", "inla.group(aet_std_lag1)", "inla.group(q_std_lag1)"),
scaled_means = c(mean(dat$prcp/30, na.rm=T),mean(dat$tmax, na.rm=T),
mean(dat$cum_loss_km2, na.rm=T), mean(dat$aet, na.rm=T), mean(dat$q, na.rm=T)),
scaled_sds = c(sd(dat$prcp/30, na.rm=T),sd(dat$tmax, na.rm=T),sd(dat$cum_loss_km2, na.rm=T),
sd(dat$aet, na.rm=T), sd(dat$q, na.rm=T))
)
<- plot_grid(sv_7_pf_cp,sv8bf_cp, labels = c("B) P. Falciparum Fixed effects and Random effects"), hjust = -0.05, ncol = 2,nrow=1)
sfcp_2
<- plot_grid(sfcp_1,sfcp_2, ncol = 1,nrow=2)) (sfcp
5.9.2 Combine plot 2
<-function(model, label = id, col1="black", dire=-1, breaks, lab_mod, lim, title, legend=NULL, filter, ylab = "Log (IR)", ylim = 10, angle=45, hjust = 1, xlabs=lim, b.size=20, flip=F) {
plot_fixed_ver2library(ggsci)
<- enquo(label)
label
<- function(model) {
extract_dat <- model$summary.fixed %>%
mydata rownames_to_column(var = "var")
return(mydata)
}
<- data.frame(var=NA)
dat_na
<- possibly(extract_dat, otherwise = dat_na)
extract_dat.safe
<- model %>% purrr::map(~extract_dat.safe(model=.)) %>%
qqq bind_rows(.id = "formula") %>%
mutate(id = match(formula, unique(formula))) %>%
filter(!is.na(`0.025quant`), `0.5quant`<filter) %>%
ggplot(aes(x = var, y = exp(`0.5quant`), col=factor(id))) +
geom_point(position = position_dodge(0.3)) +
geom_errorbar(aes(ymin = exp(`0.025quant`), ymax = exp(`0.975quant`)), width=.1, position = position_dodge(0.3)) +
geom_hline(aes(yintercept = 1), col=col1, linetype="dashed", size=.4) +
::scale_color_npg(palette = c("nrc"),name="Models", breaks=breaks, labels=lab_mod) +
ggsciscale_x_discrete(limits=lim, labels = xlabs) +
ylim(0, ylim) +
if(!is.null(legend)) {guides(color = legend)}} +
{labs(title=title, x = "variables") +
theme_bw(base_size = b.size) +
labs(y=ylab) +
if(isTRUE(flip)) {coord_flip()}} +
{theme(axis.text.x = element_text(angle = angle, hjust = hjust)
legend.position = "bottom",
,legend.box = "vertical")+
guides(col=guide_legend(nrow=2,byrow=TRUE))
return(qqq)
}
<- possibly(plot_fixed_ver2, otherwise = NA_real_)
plot_fixed_ver2.safe
#personalize plot ##########################################################
<- function(model, lab1 = NULL, scaled = NULL,
plot_random2_ver4 scaled_vars = 1,
analysis_vars = unique(mydata$var),
scaled_means = NULL,
scaled_sds = NULL,
y_lab = "Log (IR)",
name="", vars = NULL) {
print("Deprecated, update to plot_random3")
<- summary(model)
summ <- scaled_vars
a <- scaled_means
b <- scaled_sds
c
if(is.null(scaled)) {
{<- model$summary.random %>% bind_rows( .id = "var") %>% filter(var!="index")}
mydata else{
<- model$summary.random %>% bind_rows( .id = "var") %>%
mydata filter(var %in% scaled_vars)
names(scaled_sds)<-scaled_vars
names(scaled_means)<-scaled_vars
$ID<-(mydata$ID * scaled_sds[mydata$var]) + scaled_means[mydata$var]
mydata
<- mydata %>% # no estaba enviando esta operacion a ningun lado
mydata bind_rows(model$summary.random %>% bind_rows( .id = "var") %>%
filter(var!="index", !var %in% scaled_vars)) %>% filter(var %in% analysis_vars)
}
}
library(ggthemes)
<- lab1
lab2
if(!is.null(vars)) {mydata <- mydata %>% dplyr::filter(var %in% vars)}
# !is.null(vars) no se activará por defecto pues vars es NULL
if(!is.null(lab1)) {names(lab2) <- mydata %>% arrange(var) %>% distinct(var) %>% unlist()}
<- scaled_vars
new_order <- arrange(transform(mydata, var = factor(var, levels = new_order)), var)
mydata2 <- colnames(mydata)
mydata_names colnames(mydata2) <- mydata_names
levels(mydata2$var) <- lab2
<- mydata2 %>% ggplot(aes(x = ID, y = `0.5quant`)) +
plotgeom_ribbon(aes(ymin = `0.025quant`, ymax = `0.975quant`), fill="grey90", size=.3, alpha = .6) +
geom_line(color = "firebrick") +
scale_x_continuous(expand=c(0,0)) +
geom_hline(aes(yintercept = 0), col="black", linetype="dashed", size=.4) +
labs(title=name, x="", y=y_lab) +
theme_base() +
theme(plot.background = element_blank(),
strip.placement = "outside") +
if(!is.null(lab1)) {facet_wrap(.~var, scales = "free", strip.position = "bottom")}
{else{facet_wrap(.~var, scales = "free", strip.position = "bottom")}
}
return(plot)
}
#############################################################################
#cp:combine plot
<- test_pv_8.3_back_2[c(5)] %>%
sv_log_pv plot.log.fixed.safe(title = "",
filter=8,
legend = F,
ylim = 3,
angle = 0,
hjust = .5,
lim = c("workers_lag_12","nets_lag_12",
"n_eess_lag_12","enviro_lag_12"),
xlab = c("Lag of workers","Lag of nets","Lag of hfd","Lag of enviro"),
breaks = c("1","2"),
lab_mod = c("Full model", ""),
flip=T)+
ylab("Log (IR)")+
theme(plot.margin = unit(c(1,1,1,1), "lines"))
<- test_pv_8.3_back_2[[5]] %>%
sv8a_cp plot_random2_ver4(lab1 = c("Avg. Precipitation\n (mm) lag", "Tmax (ºC)","Cum deforest x 100 km2",
"Evapotranspiration\n (mm) lag", "Runoff (mm)"),
scaled = T,
analysis_vars = c("inla.group(prcp_day_std_lag1)","inla.group(tmax_std)",
"inla.group(cum_loss_km2_std)", "inla.group(aet_std_lag1)", "inla.group(q_std)"),
scaled_vars = c("inla.group(prcp_day_std_lag1)","inla.group(tmax_std)",
"inla.group(cum_loss_km2_std)", "inla.group(aet_std_lag1)", "inla.group(q_std)"),
scaled_means = c(mean(dat$prcp/30, na.rm=T),mean(dat$tmax, na.rm=T),
mean(dat$cum_loss_km2, na.rm=T), mean(dat$aet, na.rm=T), mean(dat$q, na.rm=T)),
scaled_sds = c(sd(dat$prcp/30, na.rm=T),sd(dat$tmax, na.rm=T),sd(dat$cum_loss_km2, na.rm=T),
sd(dat$aet, na.rm=T), sd(dat$q, na.rm=T))
)
<- plot_grid(sv_log_pv,sv8a_cp, labels = c("A) P. Vivax Fixed effects and Random effects"), hjust = -0.05, ncol = 2,nrow=1)
sfcp_1
<- test_pf_7_back_3[c(5)] %>%
sf_log_pf plot.log.fixed.safe(title = "",
filter=8,
legend = F,
ylim = 3,
angle = 0,
hjust = .5,
lim = c("workers_lag_12","nets_lag_12",
"n_eess_lag_12","enviro_lag_12"),
xlab = c("Lag of workers","Lag of nets","Lag of hfd","Lag of enviro"),
breaks = c("1","2"),
lab_mod = c("Full model", ""),
flip=T)+
ylab("Log (IR)")+
theme(plot.margin = unit(c(1,1,1,1), "lines"))
<- test_pf_7_back_3[[5]] %>%
sv8bf_cp plot_random2_ver4(lab1 = c("Avg. Precipitation (mm)", "Tmax (ºC) lag","Cum deforest x 100 km2",
"Evapotranspiration\n (mm) lag", "Runoff (mm) lag"),
scaled = T,
analysis_vars = c("inla.group(prcp_day_std)","inla.group(tmax_std_lag1)",
"inla.group(cum_loss_km2_std)", "inla.group(aet_std_lag1)", "inla.group(q_std_lag1)"),
scaled_vars = c("inla.group(prcp_day_std)","inla.group(tmax_std_lag1)",
"inla.group(cum_loss_km2_std)", "inla.group(aet_std_lag1)", "inla.group(q_std_lag1)"),
scaled_means = c(mean(dat$prcp/30, na.rm=T),mean(dat$tmax, na.rm=T),
mean(dat$cum_loss_km2, na.rm=T), mean(dat$aet, na.rm=T), mean(dat$q, na.rm=T)),
scaled_sds = c(sd(dat$prcp/30, na.rm=T),sd(dat$tmax, na.rm=T),sd(dat$cum_loss_km2, na.rm=T),
sd(dat$aet, na.rm=T), sd(dat$q, na.rm=T))
)
<- plot_grid(sf_log_pf,sv8bf_cp, labels = c("B) P. Falciparum Fixed effects and Random effects"), hjust = -0.05, ncol = 2,nrow=1)
sfcp_2
<- plot_grid(sfcp_1,sfcp_2, ncol = 1,nrow=2)) (sfcp
5.10 Supplementary Figure 8: Contributions of spatial random effects to P.vivax and P.falciparum risk
library(scales)
library(colorspace)
<- function(model, map, palette="Red-Green", dire=-1, trans="identity", name="", id, col1="black") {
plot_random_map2_ver2
library(sf)
=nrow(map)
n1<- enquo(id)
id2 <- as_label(id2)
by
<- model$summary.random %>% bind_rows( .id = "var") %>% filter(var=="index")
a
<- a %>% slice(1:n1) %>%
a1 ::select(ID,mean) %>%
dplyrmutate(ID=1:n1) %>%
::rename(unstructured = mean)
dplyr
<- a %>% slice(n1+1:nrow(a)) %>%
a2 ::select(ID,mean) %>%
dplyrmutate(ID=1:n1) %>%
::rename(structured = mean)
dplyr
library(RColorBrewer)
<- map %>%
a3
mutate(ID = 1:n1) %>%
left_join(a1, by="ID") %>%
left_join(a2, by="ID") %>%
mutate(posterior = structured+unstructured) %>%
ggplot() +
geom_sf(aes(fill=posterior), size = 0.3, col = col1) +
scale_fill_continuous_diverging(palette = "Green-Brown", rev = TRUE,
breaks=c(-12,0,5.7))+
labs(title=name, fill="Linear \nPredictor") +
theme_void() +
theme(panel.grid.major = element_line(color = "white"),
strip.text = element_text(size=15))
return(a3)
}
<-test_pv_8.3_back_2[[5]] %>%
rm_pv_7 plot_random_map2_ver2(map = area.sf, name= "")
###########################################################################
<- function(model, map, palette="RdBu", dire=-1, trans="identity", name="", id, col1="black") {
plot_random_map2_ver2f
library(sf)
=nrow(map)
n1<- enquo(id)
id2 <- as_label(id2)
by
<- model$summary.random %>% bind_rows( .id = "var") %>% filter(var=="index")
a
<- a %>% slice(1:n1) %>%
a1 ::select(ID,mean) %>%
dplyrmutate(ID=1:n1) %>%
::rename(unstructured = mean)
dplyr
<- a %>% slice(n1+1:nrow(a)) %>%
a2 ::select(ID,mean) %>%
dplyrmutate(ID=1:n1) %>%
::rename(structured = mean)
dplyr
library(RColorBrewer)
= brewer.pal(11, palette)
pal1
<- map %>%
a3
mutate(ID = 1:n1) %>%
left_join(a1, by="ID") %>%
left_join(a2, by="ID") %>%
mutate(posterior = structured+unstructured) %>%
ggplot() +
geom_sf(aes(fill=posterior), size = 0.3, col = col1) +
scale_fill_gradient2(low = "#18517C", mid = "white", high = "red3",
midpoint = 0, aesthetics = "fill",
breaks = c(-5.3,0,3.8))+
labs(title=name, fill="Linear \nPredictor") +
theme_void() +
theme(panel.grid.major = element_line(color = "white"),
strip.text = element_text(size=15))
return(a3)
}
<-test_pf_7_back_3[[5]] %>%
rm_pf_7 plot_random_map2_ver2f(map = area.sf, name= "")
library(cowplot)
<-plot_grid(rm_pv_7,rm_pf_7, ncol=2, labels = c("A) P. vivax", "B) P. falciparum"))) (rm_seasonal