Modeling global acute malnutrition admissions considering climate patterns

Author

R.Luttinen

1.) Protocol

Acute Malnutrition in Kenya

Our outcome is the total count of global acute malnutrition admissions in IMAM facilities in a given year month from January 2012- December 2024

Climate

We source rainfall and temperature data from the climate hazards center. https://www.chc.ucsb.edu/. For the spatial level of the climate information we use a 20-kilometer buffer zone around each IMAM healthcare facility. We calculate the monthly average maximum temperature in Celcius and the monthly sum of rainfall in millimeters for each buffer zone around a given health care facility.

We then aggregate the climate measures into three month averages for up to 1-3 months before a given admission month, 4-6 months before, and 7-9 months before.

These measures are included in separate spatial generalized additive model that include the following control variables:

1.) Month as a factor variable

2.) Year as a factor variable

3.) Livelihood zone as a factor variable

4.) Latitude and Longitude as a spline

Conflict

We source information on conflict from three databases: The Armed Conflict Location & Event Data Proejct, The Uppsala Conflict Data Program, and the Global Terrorism Database. See David Backer’s protocol for more information.

We sum all conflict (whether lethal or non-lethal) for 1-6 months before a given admission month and 7-12 months before an admission month.

These measures are included in separate spatial generalized additive model that include the following control variables:

1.) Month as a factor variable

2.) Year as a factor variable

3.) Livelihood zone as a factor variable

4.) Latitude and Longitude as a spline

library(dplyr)

Attaching package: 'dplyr'
The following objects are masked from 'package:stats':

    filter, lag
The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union
#read in datasets

#rainfall & temperature data

load("C:/Users/Rebecca/Downloads/climateadmissionsdataset.Rda")

climateadmissions<-climateadmissionsdataset%>%
  select(!geometry)

climateadmissionsdatasetfilter<-climateadmissions%>%
  filter(ASAL==1)


#make latitude numeric

climateadmissionsdatasetfilter$lat<-as.numeric(climateadmissionsdatasetfilter$lat)


#conflict

load("C:/Users/Rebecca/Downloads/conflictdataset.Rda")

2.) Modeling Visualizations

First, we will try to plot rainfall and temperature using a linear fit.

library(ggplot2)
#plot rainfall at 3, 6 and 9 months

#1-3
  ggplot(climateadmissionsdatasetfilter,aes(averagerainfall3monthspreadmissiondate, all_gam)) +
  geom_point() +
  geom_smooth(method='lm') +
  labs(x='Average Rainfall 1-3 months prior to admissions', y='Global acute malnutrition per month', title='Linear Regression Plot (Rainfall, 1-3 months)')
`geom_smooth()` using formula = 'y ~ x'
Warning: Removed 1495 rows containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 1495 rows containing missing values or values outside the scale range
(`geom_point()`).

#4-6
  ggplot(climateadmissionsdatasetfilter,aes(averagerainfall6monthspreadmissiondate, all_gam)) +
  geom_point() +
  geom_smooth(method='lm') +
  labs(x='Average Rainfall 4-6 months prior to admissions', y='Global acute malnutrition per month', title='Linear Regression Plot (Rainfall, 4-6 months)')
`geom_smooth()` using formula = 'y ~ x'
Warning: Removed 1495 rows containing non-finite outside the scale range
(`stat_smooth()`).
Removed 1495 rows containing missing values or values outside the scale range
(`geom_point()`).

#7-9  
    
  ggplot(climateadmissionsdatasetfilter,aes(averagerainfall9monthspreadmissiondate, all_gam)) +
  geom_point() +
  geom_smooth(method='lm') +
  labs(x='Average Rainfall 7-9 months prior to admissions', y='Global acute malnutrition per month', title='Linear Regression Plot (Rainfall, 7-9 months)')
`geom_smooth()` using formula = 'y ~ x'
Warning: Removed 1495 rows containing non-finite outside the scale range
(`stat_smooth()`).
Removed 1495 rows containing missing values or values outside the scale range
(`geom_point()`).

#plot temperature at 3, 6 and 9 months
  
  #1-3
  ggplot(climateadmissionsdatasetfilter,aes(averagetemperature3monthspreadmissiondate, all_gam)) +
  geom_point() +
  geom_smooth(method='lm') +
  labs(x='Average Temperature 1-3 months prior to admissions', y='Global acute malnutrition per month', title='Linear Regression Plot (Temperature, 1-3 months)')
`geom_smooth()` using formula = 'y ~ x'

#4-6
  ggplot(climateadmissionsdatasetfilter,aes(averagetemperature6monthspreadmissiondate, all_gam)) +
  geom_point() +
  geom_smooth(method='lm') +
  labs(x='Average Temperature 4-6 months prior to admissions', y='Global acute malnutrition per month', title='Linear Regression Plot (Temperature, 4-6 months)')
`geom_smooth()` using formula = 'y ~ x'

#7-9  
    
  ggplot(climateadmissionsdatasetfilter,aes(averagetemperature9monthspreadmissiondate, all_gam)) +
  geom_point() +
  geom_smooth(method='lm') +
  labs(x='Average Temperature 7-9 months prior to admissions', y='Global acute malnutrition per month', title='Linear Regression Plot (Temperature, 7-9 months)')
`geom_smooth()` using formula = 'y ~ x'

  #plot conflict for 1-6 months and 7-12 months
  
    
  ggplot(conflictdataset,aes(sumconflict6monthspreadmissions, all_gam)) +
  geom_point() +
  geom_smooth(method='lm') +
  labs(x='Sum of Conflict 1-6 months prior to admissions', y='Global acute malnutrition per month', title='Linear Regression Plot (Conflict, 1-6 months)')
`geom_smooth()` using formula = 'y ~ x'
Warning: Removed 143594 rows containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 143594 rows containing missing values or values outside the scale range
(`geom_point()`).

  ggplot(conflictdataset,aes(sumconflict6monthspreadmissions, all_gam)) +
  geom_point() +
  geom_smooth(method='lm') +
  labs(x='Sum of Conflict 7-12 months prior to admissions', y='Global acute malnutrition per month', title='Linear Regression Plot (Conflict, 7-12 months)')
`geom_smooth()` using formula = 'y ~ x'
Warning: Removed 143594 rows containing non-finite outside the scale range
(`stat_smooth()`).
Removed 143594 rows containing missing values or values outside the scale range
(`geom_point()`).

These plots show us that these climate measures don’t demonstrate a linear relationship with global acute malnutrition admissions. Now we will try to investigate whether they demonstrate a curvilinear relationship.

#try out a curvilinear relationship

library(mgcv)
Warning: package 'mgcv' was built under R version 4.4.2
Loading required package: nlme

Attaching package: 'nlme'
The following object is masked from 'package:dplyr':

    collapse
This is mgcv 1.9-1. For overview type 'help("mgcv-package")'.
#first work with climate

#3 month models

mod_gamrain3 = gam(all_gam ~ s(averagerainfall3monthspreadmissiondate) +factor(year) +factor(month) +factor(LZNAME) + s(lat), data = climateadmissionsdatasetfilter)
summary(mod_gamrain3)

Family: gaussian 
Link function: identity 

Formula:
all_gam ~ s(averagerainfall3monthspreadmissiondate) + factor(year) + 
    factor(month) + factor(LZNAME) + s(lat)

Parametric coefficients:
                                                                 Estimate
(Intercept)                                                      11.02163
factor(year)2013                                                 -2.91057
factor(year)2014                                                 -2.51035
factor(year)2015                                                 -3.91909
factor(year)2016                                                 -4.37781
factor(year)2017                                                  1.01308
factor(year)2018                                                 -1.99648
factor(year)2019                                                 -2.66737
factor(year)2020                                                 -6.16878
factor(year)2021                                                 -5.68456
factor(year)2022                                                  2.41408
factor(year)2023                                                  4.61124
factor(year)2024                                                 -0.72529
factor(month)2                                                    2.02065
factor(month)3                                                    0.86328
factor(month)4                                                   -1.26817
factor(month)5                                                    0.99345
factor(month)6                                                   -0.20259
factor(month)7                                                   -0.89254
factor(month)8                                                   -1.91198
factor(month)9                                                   -2.25783
factor(month)10                                                  -1.52058
factor(month)11                                                  -1.37295
factor(month)12                                                  -2.05512
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone   -1.89290
factor(LZNAME)Coastal Medium Potential Farming Zone              -4.79174
factor(LZNAME)Grasslands Pastoral Zone                            8.10446
factor(LZNAME)Lake Turkana Fishing                               21.98389
factor(LZNAME)Mandera Riverine Zone                               7.73996
factor(LZNAME)Marsabit Marginal Mixed Farming Zone               -0.03393
factor(LZNAME)Northeastern Agropastoral Zone                     15.32866
factor(LZNAME)Northeastern Pastoral Zone                          6.48169
factor(LZNAME)Northern Pastoral Zone                              3.08212
factor(LZNAME)Northwestern Agropastoral Zone                      9.72439
factor(LZNAME)Northwestern Pastoral Zone                         13.98619
factor(LZNAME)Southeastern Marginal Mixed Farming Zone           -1.12048
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone  -0.86770
factor(LZNAME)Southeastern Pastoral  Zone                         2.43870
factor(LZNAME)Southern Agropastoral Zone                         -3.90792
factor(LZNAME)Southern Pastoral Zone                             -2.81119
factor(LZNAME)Tana Riverine Zone                                 -3.06035
factor(LZNAME)Turkwell Riverine Zone                             13.84977
factor(LZNAME)Western Agropastoral Zone                           2.12398
factor(LZNAME)Western High Potential Zone                       -10.77879
factor(LZNAME)Western Medium Potential Zone                      -2.10134
                                                                Std. Error
(Intercept)                                                        0.77790
factor(year)2013                                                   0.46938
factor(year)2014                                                   0.46058
factor(year)2015                                                   0.44704
factor(year)2016                                                   0.44250
factor(year)2017                                                   0.44754
factor(year)2018                                                   0.41996
factor(year)2019                                                   0.41270
factor(year)2020                                                   0.41394
factor(year)2021                                                   0.41164
factor(year)2022                                                   0.40629
factor(year)2023                                                   0.39869
factor(year)2024                                                   0.40001
factor(month)2                                                     0.33269
factor(month)3                                                     0.34426
factor(month)4                                                     0.34473
factor(month)5                                                     0.33017
factor(month)6                                                     0.33117
factor(month)7                                                     0.32940
factor(month)8                                                     0.33838
factor(month)9                                                     0.35011
factor(month)10                                                    0.35115
factor(month)11                                                    0.34063
factor(month)12                                                    0.33079
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone     0.80058
factor(LZNAME)Coastal Medium Potential Farming Zone                0.88583
factor(LZNAME)Grasslands Pastoral Zone                             0.87707
factor(LZNAME)Lake Turkana Fishing                                 0.88595
factor(LZNAME)Mandera Riverine Zone                                1.48446
factor(LZNAME)Marsabit Marginal Mixed Farming Zone                 0.99350
factor(LZNAME)Northeastern Agropastoral Zone                       0.90336
factor(LZNAME)Northeastern Pastoral Zone                           0.85722
factor(LZNAME)Northern Pastoral Zone                               0.68574
factor(LZNAME)Northwestern Agropastoral Zone                       1.07134
factor(LZNAME)Northwestern Pastoral Zone                           0.72756
factor(LZNAME)Southeastern Marginal Mixed Farming Zone             0.71135
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone    0.78382
factor(LZNAME)Southeastern Pastoral  Zone                          0.90884
factor(LZNAME)Southern Agropastoral Zone                           0.74823
factor(LZNAME)Southern Pastoral Zone                               0.67586
factor(LZNAME)Tana Riverine Zone                                   0.99614
factor(LZNAME)Turkwell Riverine Zone                               0.93328
factor(LZNAME)Western Agropastoral Zone                            0.66328
factor(LZNAME)Western High Potential Zone                          0.98066
factor(LZNAME)Western Medium Potential Zone                        0.77837
                                                                t value
(Intercept)                                                      14.168
factor(year)2013                                                 -6.201
factor(year)2014                                                 -5.450
factor(year)2015                                                 -8.767
factor(year)2016                                                 -9.893
factor(year)2017                                                  2.264
factor(year)2018                                                 -4.754
factor(year)2019                                                 -6.463
factor(year)2020                                                -14.903
factor(year)2021                                                -13.810
factor(year)2022                                                  5.942
factor(year)2023                                                 11.566
factor(year)2024                                                 -1.813
factor(month)2                                                    6.074
factor(month)3                                                    2.508
factor(month)4                                                   -3.679
factor(month)5                                                    3.009
factor(month)6                                                   -0.612
factor(month)7                                                   -2.710
factor(month)8                                                   -5.650
factor(month)9                                                   -6.449
factor(month)10                                                  -4.330
factor(month)11                                                  -4.031
factor(month)12                                                  -6.213
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone   -2.364
factor(LZNAME)Coastal Medium Potential Farming Zone              -5.409
factor(LZNAME)Grasslands Pastoral Zone                            9.240
factor(LZNAME)Lake Turkana Fishing                               24.814
factor(LZNAME)Mandera Riverine Zone                               5.214
factor(LZNAME)Marsabit Marginal Mixed Farming Zone               -0.034
factor(LZNAME)Northeastern Agropastoral Zone                     16.969
factor(LZNAME)Northeastern Pastoral Zone                          7.561
factor(LZNAME)Northern Pastoral Zone                              4.495
factor(LZNAME)Northwestern Agropastoral Zone                      9.077
factor(LZNAME)Northwestern Pastoral Zone                         19.223
factor(LZNAME)Southeastern Marginal Mixed Farming Zone           -1.575
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone  -1.107
factor(LZNAME)Southeastern Pastoral  Zone                         2.683
factor(LZNAME)Southern Agropastoral Zone                         -5.223
factor(LZNAME)Southern Pastoral Zone                             -4.159
factor(LZNAME)Tana Riverine Zone                                 -3.072
factor(LZNAME)Turkwell Riverine Zone                             14.840
factor(LZNAME)Western Agropastoral Zone                           3.202
factor(LZNAME)Western High Potential Zone                       -10.991
factor(LZNAME)Western Medium Potential Zone                      -2.700
                                                                Pr(>|t|)    
(Intercept)                                                      < 2e-16 ***
factor(year)2013                                                5.63e-10 ***
factor(year)2014                                                5.03e-08 ***
factor(year)2015                                                 < 2e-16 ***
factor(year)2016                                                 < 2e-16 ***
factor(year)2017                                                0.023596 *  
factor(year)2018                                                2.00e-06 ***
factor(year)2019                                                1.03e-10 ***
factor(year)2020                                                 < 2e-16 ***
factor(year)2021                                                 < 2e-16 ***
factor(year)2022                                                2.83e-09 ***
factor(year)2023                                                 < 2e-16 ***
factor(year)2024                                                0.069807 .  
factor(month)2                                                  1.25e-09 ***
factor(month)3                                                  0.012156 *  
factor(month)4                                                  0.000234 ***
factor(month)5                                                  0.002622 ** 
factor(month)6                                                  0.540712    
factor(month)7                                                  0.006738 ** 
factor(month)8                                                  1.60e-08 ***
factor(month)9                                                  1.13e-10 ***
factor(month)10                                                 1.49e-05 ***
factor(month)11                                                 5.57e-05 ***
factor(month)12                                                 5.22e-10 ***
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone  0.018059 *  
factor(LZNAME)Coastal Medium Potential Farming Zone             6.34e-08 ***
factor(LZNAME)Grasslands Pastoral Zone                           < 2e-16 ***
factor(LZNAME)Lake Turkana Fishing                               < 2e-16 ***
factor(LZNAME)Mandera Riverine Zone                             1.85e-07 ***
factor(LZNAME)Marsabit Marginal Mixed Farming Zone              0.972755    
factor(LZNAME)Northeastern Agropastoral Zone                     < 2e-16 ***
factor(LZNAME)Northeastern Pastoral Zone                        4.01e-14 ***
factor(LZNAME)Northern Pastoral Zone                            6.98e-06 ***
factor(LZNAME)Northwestern Agropastoral Zone                     < 2e-16 ***
factor(LZNAME)Northwestern Pastoral Zone                         < 2e-16 ***
factor(LZNAME)Southeastern Marginal Mixed Farming Zone          0.115227    
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone 0.268292    
factor(LZNAME)Southeastern Pastoral  Zone                       0.007291 ** 
factor(LZNAME)Southern Agropastoral Zone                        1.76e-07 ***
factor(LZNAME)Southern Pastoral Zone                            3.19e-05 ***
factor(LZNAME)Tana Riverine Zone                                0.002125 ** 
factor(LZNAME)Turkwell Riverine Zone                             < 2e-16 ***
factor(LZNAME)Western Agropastoral Zone                         0.001364 ** 
factor(LZNAME)Western High Potential Zone                        < 2e-16 ***
factor(LZNAME)Western Medium Potential Zone                     0.006942 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Approximate significance of smooth terms:
                                            edf Ref.df      F p-value    
s(averagerainfall3monthspreadmissiondate) 5.777  6.984  29.46  <2e-16 ***
s(lat)                                    8.977  9.000 506.91  <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

R-sq.(adj) =  0.121   Deviance explained = 12.1%
GCV = 754.48  Scale est. = 754.21    n = 170344
mod_gamtemp3 = gam(all_gam ~ s(averagetemperature3monthspreadmissiondate) +factor(year) +factor(month) +factor(LZNAME) + s(lat), data = climateadmissionsdatasetfilter)
summary(mod_gamtemp3)

Family: gaussian 
Link function: identity 

Formula:
all_gam ~ s(averagetemperature3monthspreadmissiondate) + factor(year) + 
    factor(month) + factor(LZNAME) + s(lat)

Parametric coefficients:
                                                                Estimate
(Intercept)                                                      10.3654
factor(year)2013                                                 -3.1238
factor(year)2014                                                 -2.6280
factor(year)2015                                                 -4.0906
factor(year)2016                                                 -4.4453
factor(year)2017                                                  1.1457
factor(year)2018                                                 -2.0565
factor(year)2019                                                 -2.8019
factor(year)2020                                                 -6.4381
factor(year)2021                                                 -5.6269
factor(year)2022                                                  2.6497
factor(year)2023                                                  4.4961
factor(year)2024                                                 -1.0534
factor(month)2                                                    2.1521
factor(month)3                                                    1.9034
factor(month)4                                                   -0.2792
factor(month)5                                                    0.8698
factor(month)6                                                   -0.4494
factor(month)7                                                   -0.8299
factor(month)8                                                   -0.4954
factor(month)9                                                   -0.1738
factor(month)10                                                   0.5198
factor(month)11                                                  -0.1101
factor(month)12                                                  -1.9533
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone   -2.1192
factor(LZNAME)Coastal Medium Potential Farming Zone              -5.1263
factor(LZNAME)Grasslands Pastoral Zone                            9.7102
factor(LZNAME)Lake Turkana Fishing                               20.6059
factor(LZNAME)Mandera Riverine Zone                              10.6357
factor(LZNAME)Marsabit Marginal Mixed Farming Zone                0.2141
factor(LZNAME)Northeastern Agropastoral Zone                     16.0947
factor(LZNAME)Northeastern Pastoral Zone                          8.2779
factor(LZNAME)Northern Pastoral Zone                              2.0000
factor(LZNAME)Northwestern Agropastoral Zone                      9.1265
factor(LZNAME)Northwestern Pastoral Zone                         13.9279
factor(LZNAME)Southeastern Marginal Mixed Farming Zone           -1.8043
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone  -0.7943
factor(LZNAME)Southeastern Pastoral  Zone                         2.9778
factor(LZNAME)Southern Agropastoral Zone                         -3.5650
factor(LZNAME)Southern Pastoral Zone                             -2.6278
factor(LZNAME)Tana Riverine Zone                                 -2.3639
factor(LZNAME)Turkwell Riverine Zone                             13.0470
factor(LZNAME)Western Agropastoral Zone                           1.6708
factor(LZNAME)Western High Potential Zone                       -10.3310
factor(LZNAME)Western Medium Potential Zone                      -1.8232
                                                                Std. Error
(Intercept)                                                         0.7890
factor(year)2013                                                    0.4697
factor(year)2014                                                    0.4607
factor(year)2015                                                    0.4478
factor(year)2016                                                    0.4432
factor(year)2017                                                    0.4471
factor(year)2018                                                    0.4196
factor(year)2019                                                    0.4134
factor(year)2020                                                    0.4113
factor(year)2021                                                    0.4115
factor(year)2022                                                    0.4065
factor(year)2023                                                    0.3994
factor(year)2024                                                    0.3999
factor(month)2                                                      0.3325
factor(month)3                                                      0.3366
factor(month)4                                                      0.3428
factor(month)5                                                      0.3369
factor(month)6                                                      0.3308
factor(month)7                                                      0.3316
factor(month)8                                                      0.3372
factor(month)9                                                      0.3403
factor(month)10                                                     0.3360
factor(month)11                                                     0.3306
factor(month)12                                                     0.3302
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone      0.8173
factor(LZNAME)Coastal Medium Potential Farming Zone                 0.9020
factor(LZNAME)Grasslands Pastoral Zone                              0.9055
factor(LZNAME)Lake Turkana Fishing                                  0.9343
factor(LZNAME)Mandera Riverine Zone                                 1.5306
factor(LZNAME)Marsabit Marginal Mixed Farming Zone                  1.0093
factor(LZNAME)Northeastern Agropastoral Zone                        0.9125
factor(LZNAME)Northeastern Pastoral Zone                            0.8893
factor(LZNAME)Northern Pastoral Zone                                0.7193
factor(LZNAME)Northwestern Agropastoral Zone                        1.1026
factor(LZNAME)Northwestern Pastoral Zone                            0.7553
factor(LZNAME)Southeastern Marginal Mixed Farming Zone              0.7340
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone     0.7992
factor(LZNAME)Southeastern Pastoral  Zone                           0.9293
factor(LZNAME)Southern Agropastoral Zone                            0.7522
factor(LZNAME)Southern Pastoral Zone                                0.6873
factor(LZNAME)Tana Riverine Zone                                    1.0180
factor(LZNAME)Turkwell Riverine Zone                                0.9689
factor(LZNAME)Western Agropastoral Zone                             0.6762
factor(LZNAME)Western High Potential Zone                           0.9906
factor(LZNAME)Western Medium Potential Zone                         0.7858
                                                                t value
(Intercept)                                                      13.137
factor(year)2013                                                 -6.650
factor(year)2014                                                 -5.704
factor(year)2015                                                 -9.135
factor(year)2016                                                -10.031
factor(year)2017                                                  2.562
factor(year)2018                                                 -4.901
factor(year)2019                                                 -6.777
factor(year)2020                                                -15.653
factor(year)2021                                                -13.673
factor(year)2022                                                  6.518
factor(year)2023                                                 11.258
factor(year)2024                                                 -2.634
factor(month)2                                                    6.473
factor(month)3                                                    5.654
factor(month)4                                                   -0.815
factor(month)5                                                    2.582
factor(month)6                                                   -1.358
factor(month)7                                                   -2.503
factor(month)8                                                   -1.469
factor(month)9                                                   -0.511
factor(month)10                                                   1.547
factor(month)11                                                  -0.333
factor(month)12                                                  -5.915
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone   -2.593
factor(LZNAME)Coastal Medium Potential Farming Zone              -5.683
factor(LZNAME)Grasslands Pastoral Zone                           10.724
factor(LZNAME)Lake Turkana Fishing                               22.054
factor(LZNAME)Mandera Riverine Zone                               6.949
factor(LZNAME)Marsabit Marginal Mixed Farming Zone                0.212
factor(LZNAME)Northeastern Agropastoral Zone                     17.638
factor(LZNAME)Northeastern Pastoral Zone                          9.308
factor(LZNAME)Northern Pastoral Zone                              2.780
factor(LZNAME)Northwestern Agropastoral Zone                      8.277
factor(LZNAME)Northwestern Pastoral Zone                         18.440
factor(LZNAME)Southeastern Marginal Mixed Farming Zone           -2.458
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone  -0.994
factor(LZNAME)Southeastern Pastoral  Zone                         3.204
factor(LZNAME)Southern Agropastoral Zone                         -4.739
factor(LZNAME)Southern Pastoral Zone                             -3.823
factor(LZNAME)Tana Riverine Zone                                 -2.322
factor(LZNAME)Turkwell Riverine Zone                             13.466
factor(LZNAME)Western Agropastoral Zone                           2.471
factor(LZNAME)Western High Potential Zone                       -10.429
factor(LZNAME)Western Medium Potential Zone                      -2.320
                                                                Pr(>|t|)    
(Intercept)                                                      < 2e-16 ***
factor(year)2013                                                2.94e-11 ***
factor(year)2014                                                1.17e-08 ***
factor(year)2015                                                 < 2e-16 ***
factor(year)2016                                                 < 2e-16 ***
factor(year)2017                                                0.010400 *  
factor(year)2018                                                9.54e-07 ***
factor(year)2019                                                1.23e-11 ***
factor(year)2020                                                 < 2e-16 ***
factor(year)2021                                                 < 2e-16 ***
factor(year)2022                                                7.13e-11 ***
factor(year)2023                                                 < 2e-16 ***
factor(year)2024                                                0.008432 ** 
factor(month)2                                                  9.61e-11 ***
factor(month)3                                                  1.57e-08 ***
factor(month)4                                                  0.415352    
factor(month)5                                                  0.009834 ** 
factor(month)6                                                  0.174358    
factor(month)7                                                  0.012331 *  
factor(month)8                                                  0.141810    
factor(month)9                                                  0.609555    
factor(month)10                                                 0.121848    
factor(month)11                                                 0.739124    
factor(month)12                                                 3.32e-09 ***
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone  0.009513 ** 
factor(LZNAME)Coastal Medium Potential Farming Zone             1.32e-08 ***
factor(LZNAME)Grasslands Pastoral Zone                           < 2e-16 ***
factor(LZNAME)Lake Turkana Fishing                               < 2e-16 ***
factor(LZNAME)Mandera Riverine Zone                             3.70e-12 ***
factor(LZNAME)Marsabit Marginal Mixed Farming Zone              0.832020    
factor(LZNAME)Northeastern Agropastoral Zone                     < 2e-16 ***
factor(LZNAME)Northeastern Pastoral Zone                         < 2e-16 ***
factor(LZNAME)Northern Pastoral Zone                            0.005430 ** 
factor(LZNAME)Northwestern Agropastoral Zone                     < 2e-16 ***
factor(LZNAME)Northwestern Pastoral Zone                         < 2e-16 ***
factor(LZNAME)Southeastern Marginal Mixed Farming Zone          0.013962 *  
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone 0.320289    
factor(LZNAME)Southeastern Pastoral  Zone                       0.001354 ** 
factor(LZNAME)Southern Agropastoral Zone                        2.15e-06 ***
factor(LZNAME)Southern Pastoral Zone                            0.000132 ***
factor(LZNAME)Tana Riverine Zone                                0.020227 *  
factor(LZNAME)Turkwell Riverine Zone                             < 2e-16 ***
factor(LZNAME)Western Agropastoral Zone                         0.013486 *  
factor(LZNAME)Western High Potential Zone                        < 2e-16 ***
factor(LZNAME)Western Medium Potential Zone                     0.020332 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Approximate significance of smooth terms:
                                               edf Ref.df      F p-value    
s(averagetemperature3monthspreadmissiondate) 5.812  7.051  38.43  <2e-16 ***
s(lat)                                       8.961  9.000 476.43  <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

R-sq.(adj) =  0.121   Deviance explained = 12.2%
GCV = 761.57  Scale est. = 761.31    n = 171804
#6 month models

mod_gamrain6 = gam(all_gam ~ s(averagerainfall6monthspreadmissiondate)+factor(year) +factor(month) +factor(LZNAME) + s(lat), data = climateadmissionsdatasetfilter)
summary(mod_gamrain6)

Family: gaussian 
Link function: identity 

Formula:
all_gam ~ s(averagerainfall6monthspreadmissiondate) + factor(year) + 
    factor(month) + factor(LZNAME) + s(lat)

Parametric coefficients:
                                                                Estimate
(Intercept)                                                       9.4139
factor(year)2013                                                 -2.9517
factor(year)2014                                                 -2.7192
factor(year)2015                                                 -4.1351
factor(year)2016                                                 -4.4470
factor(year)2017                                                  0.6899
factor(year)2018                                                 -1.9761
factor(year)2019                                                 -2.9998
factor(year)2020                                                 -5.9458
factor(year)2021                                                 -5.7986
factor(year)2022                                                  2.1150
factor(year)2023                                                  4.3225
factor(year)2024                                                 -0.6936
factor(month)2                                                    3.0256
factor(month)3                                                    3.8498
factor(month)4                                                    1.9684
factor(month)5                                                    2.9205
factor(month)6                                                    0.5848
factor(month)7                                                    0.0557
factor(month)8                                                    1.5587
factor(month)9                                                    1.9365
factor(month)10                                                   2.5814
factor(month)11                                                   0.7227
factor(month)12                                                  -1.7961
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone   -2.0107
factor(LZNAME)Coastal Medium Potential Farming Zone              -4.8613
factor(LZNAME)Grasslands Pastoral Zone                            7.3465
factor(LZNAME)Lake Turkana Fishing                               21.4486
factor(LZNAME)Mandera Riverine Zone                               6.9058
factor(LZNAME)Marsabit Marginal Mixed Farming Zone               -0.1527
factor(LZNAME)Northeastern Agropastoral Zone                     14.8450
factor(LZNAME)Northeastern Pastoral Zone                          5.7207
factor(LZNAME)Northern Pastoral Zone                              2.7741
factor(LZNAME)Northwestern Agropastoral Zone                      8.9563
factor(LZNAME)Northwestern Pastoral Zone                         13.2430
factor(LZNAME)Southeastern Marginal Mixed Farming Zone           -1.3666
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone  -0.8647
factor(LZNAME)Southeastern Pastoral  Zone                         1.9793
factor(LZNAME)Southern Agropastoral Zone                         -4.0026
factor(LZNAME)Southern Pastoral Zone                             -3.0916
factor(LZNAME)Tana Riverine Zone                                 -3.5743
factor(LZNAME)Turkwell Riverine Zone                             12.9241
factor(LZNAME)Western Agropastoral Zone                           1.9830
factor(LZNAME)Western High Potential Zone                       -10.7968
factor(LZNAME)Western Medium Potential Zone                      -2.1593
                                                                Std. Error
(Intercept)                                                         0.7699
factor(year)2013                                                    0.4690
factor(year)2014                                                    0.4608
factor(year)2015                                                    0.4471
factor(year)2016                                                    0.4425
factor(year)2017                                                    0.4484
factor(year)2018                                                    0.4196
factor(year)2019                                                    0.4131
factor(year)2020                                                    0.4144
factor(year)2021                                                    0.4117
factor(year)2022                                                    0.4070
factor(year)2023                                                    0.3988
factor(year)2024                                                    0.3999
factor(month)2                                                      0.3363
factor(month)3                                                      0.3510
factor(month)4                                                      0.3564
factor(month)5                                                      0.3496
factor(month)6                                                      0.3386
factor(month)7                                                      0.3397
factor(month)8                                                      0.3568
factor(month)9                                                      0.3639
factor(month)10                                                     0.3579
factor(month)11                                                     0.3347
factor(month)12                                                     0.3298
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone      0.8005
factor(LZNAME)Coastal Medium Potential Farming Zone                 0.8856
factor(LZNAME)Grasslands Pastoral Zone                              0.8781
factor(LZNAME)Lake Turkana Fishing                                  0.8866
factor(LZNAME)Mandera Riverine Zone                                 1.4847
factor(LZNAME)Marsabit Marginal Mixed Farming Zone                  0.9933
factor(LZNAME)Northeastern Agropastoral Zone                        0.9038
factor(LZNAME)Northeastern Pastoral Zone                            0.8581
factor(LZNAME)Northern Pastoral Zone                                0.6860
factor(LZNAME)Northwestern Agropastoral Zone                        1.0719
factor(LZNAME)Northwestern Pastoral Zone                            0.7290
factor(LZNAME)Southeastern Marginal Mixed Farming Zone              0.7114
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone     0.7837
factor(LZNAME)Southeastern Pastoral  Zone                           0.9094
factor(LZNAME)Southern Agropastoral Zone                            0.7480
factor(LZNAME)Southern Pastoral Zone                                0.6759
factor(LZNAME)Tana Riverine Zone                                    0.9967
factor(LZNAME)Turkwell Riverine Zone                                0.9344
factor(LZNAME)Western Agropastoral Zone                             0.6633
factor(LZNAME)Western High Potential Zone                           0.9807
factor(LZNAME)Western Medium Potential Zone                         0.7782
                                                                t value
(Intercept)                                                      12.227
factor(year)2013                                                 -6.293
factor(year)2014                                                 -5.901
factor(year)2015                                                 -9.249
factor(year)2016                                                -10.051
factor(year)2017                                                  1.539
factor(year)2018                                                 -4.709
factor(year)2019                                                 -7.261
factor(year)2020                                                -14.348
factor(year)2021                                                -14.085
factor(year)2022                                                  5.197
factor(year)2023                                                 10.839
factor(year)2024                                                 -1.734
factor(month)2                                                    8.998
factor(month)3                                                   10.969
factor(month)4                                                    5.523
factor(month)5                                                    8.353
factor(month)6                                                    1.727
factor(month)7                                                    0.164
factor(month)8                                                    4.368
factor(month)9                                                    5.322
factor(month)10                                                   7.213
factor(month)11                                                   2.159
factor(month)12                                                  -5.446
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone   -2.512
factor(LZNAME)Coastal Medium Potential Farming Zone              -5.489
factor(LZNAME)Grasslands Pastoral Zone                            8.367
factor(LZNAME)Lake Turkana Fishing                               24.191
factor(LZNAME)Mandera Riverine Zone                               4.651
factor(LZNAME)Marsabit Marginal Mixed Farming Zone               -0.154
factor(LZNAME)Northeastern Agropastoral Zone                     16.425
factor(LZNAME)Northeastern Pastoral Zone                          6.667
factor(LZNAME)Northern Pastoral Zone                              4.044
factor(LZNAME)Northwestern Agropastoral Zone                      8.356
factor(LZNAME)Northwestern Pastoral Zone                         18.166
factor(LZNAME)Southeastern Marginal Mixed Farming Zone           -1.921
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone  -1.103
factor(LZNAME)Southeastern Pastoral  Zone                         2.176
factor(LZNAME)Southern Agropastoral Zone                         -5.351
factor(LZNAME)Southern Pastoral Zone                             -4.574
factor(LZNAME)Tana Riverine Zone                                 -3.586
factor(LZNAME)Turkwell Riverine Zone                             13.831
factor(LZNAME)Western Agropastoral Zone                           2.989
factor(LZNAME)Western High Potential Zone                       -11.009
factor(LZNAME)Western Medium Potential Zone                      -2.775
                                                                Pr(>|t|)    
(Intercept)                                                      < 2e-16 ***
factor(year)2013                                                3.12e-10 ***
factor(year)2014                                                3.63e-09 ***
factor(year)2015                                                 < 2e-16 ***
factor(year)2016                                                 < 2e-16 ***
factor(year)2017                                                0.123880    
factor(year)2018                                                2.49e-06 ***
factor(year)2019                                                3.86e-13 ***
factor(year)2020                                                 < 2e-16 ***
factor(year)2021                                                 < 2e-16 ***
factor(year)2022                                                2.03e-07 ***
factor(year)2023                                                 < 2e-16 ***
factor(year)2024                                                0.082868 .  
factor(month)2                                                   < 2e-16 ***
factor(month)3                                                   < 2e-16 ***
factor(month)4                                                  3.35e-08 ***
factor(month)5                                                   < 2e-16 ***
factor(month)6                                                  0.084172 .  
factor(month)7                                                  0.869788    
factor(month)8                                                  1.25e-05 ***
factor(month)9                                                  1.03e-07 ***
factor(month)10                                                 5.48e-13 ***
factor(month)11                                                 0.030827 *  
factor(month)12                                                 5.16e-08 ***
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone  0.012011 *  
factor(LZNAME)Coastal Medium Potential Farming Zone             4.04e-08 ***
factor(LZNAME)Grasslands Pastoral Zone                           < 2e-16 ***
factor(LZNAME)Lake Turkana Fishing                               < 2e-16 ***
factor(LZNAME)Mandera Riverine Zone                             3.30e-06 ***
factor(LZNAME)Marsabit Marginal Mixed Farming Zone              0.877865    
factor(LZNAME)Northeastern Agropastoral Zone                     < 2e-16 ***
factor(LZNAME)Northeastern Pastoral Zone                        2.63e-11 ***
factor(LZNAME)Northern Pastoral Zone                            5.26e-05 ***
factor(LZNAME)Northwestern Agropastoral Zone                     < 2e-16 ***
factor(LZNAME)Northwestern Pastoral Zone                         < 2e-16 ***
factor(LZNAME)Southeastern Marginal Mixed Farming Zone          0.054725 .  
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone 0.269860    
factor(LZNAME)Southeastern Pastoral  Zone                       0.029523 *  
factor(LZNAME)Southern Agropastoral Zone                        8.76e-08 ***
factor(LZNAME)Southern Pastoral Zone                            4.79e-06 ***
factor(LZNAME)Tana Riverine Zone                                0.000336 ***
factor(LZNAME)Turkwell Riverine Zone                             < 2e-16 ***
factor(LZNAME)Western Agropastoral Zone                         0.002795 ** 
factor(LZNAME)Western High Potential Zone                        < 2e-16 ***
factor(LZNAME)Western Medium Potential Zone                     0.005522 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Approximate significance of smooth terms:
                                            edf Ref.df     F p-value    
s(averagerainfall6monthspreadmissiondate) 7.798  8.637  39.2  <2e-16 ***
s(lat)                                    8.976  9.000 514.2  <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

R-sq.(adj) =  0.121   Deviance explained = 12.2%
GCV = 753.92  Scale est. = 753.64    n = 170344
mod_gamtemp6 = gam(all_gam ~ s(averagetemperature6monthspreadmissiondate)+factor(year) +factor(month) +factor(LZNAME) + s(lat), data = climateadmissionsdatasetfilter)
summary(mod_gamtemp6)

Family: gaussian 
Link function: identity 

Formula:
all_gam ~ s(averagetemperature6monthspreadmissiondate) + factor(year) + 
    factor(month) + factor(LZNAME) + s(lat)

Parametric coefficients:
                                                                Estimate
(Intercept)                                                      11.2081
factor(year)2013                                                 -3.1341
factor(year)2014                                                 -2.6532
factor(year)2015                                                 -4.1185
factor(year)2016                                                 -4.5332
factor(year)2017                                                  1.1085
factor(year)2018                                                 -2.0665
factor(year)2019                                                 -2.8722
factor(year)2020                                                 -6.4464
factor(year)2021                                                 -5.6443
factor(year)2022                                                  2.5186
factor(year)2023                                                  4.4947
factor(year)2024                                                 -1.1375
factor(month)2                                                    1.8408
factor(month)3                                                    1.3625
factor(month)4                                                   -0.8910
factor(month)5                                                    0.2302
factor(month)6                                                   -1.1322
factor(month)7                                                   -1.7163
factor(month)8                                                   -1.6115
factor(month)9                                                   -1.3195
factor(month)10                                                  -0.2283
factor(month)11                                                  -0.2907
factor(month)12                                                  -1.8126
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone   -2.1594
factor(LZNAME)Coastal Medium Potential Farming Zone              -5.2295
factor(LZNAME)Grasslands Pastoral Zone                            9.4993
factor(LZNAME)Lake Turkana Fishing                               19.7848
factor(LZNAME)Mandera Riverine Zone                              10.3867
factor(LZNAME)Marsabit Marginal Mixed Farming Zone                0.2387
factor(LZNAME)Northeastern Agropastoral Zone                     16.0818
factor(LZNAME)Northeastern Pastoral Zone                          8.0614
factor(LZNAME)Northern Pastoral Zone                              1.6289
factor(LZNAME)Northwestern Agropastoral Zone                      8.3632
factor(LZNAME)Northwestern Pastoral Zone                         13.3832
factor(LZNAME)Southeastern Marginal Mixed Farming Zone           -2.0419
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone  -0.9534
factor(LZNAME)Southeastern Pastoral  Zone                         2.7662
factor(LZNAME)Southern Agropastoral Zone                         -3.6066
factor(LZNAME)Southern Pastoral Zone                             -2.7964
factor(LZNAME)Tana Riverine Zone                                 -2.5704
factor(LZNAME)Turkwell Riverine Zone                             12.1916
factor(LZNAME)Western Agropastoral Zone                           1.5128
factor(LZNAME)Western High Potential Zone                       -10.5800
factor(LZNAME)Western Medium Potential Zone                      -1.9345
                                                                Std. Error
(Intercept)                                                         0.8051
factor(year)2013                                                    0.4696
factor(year)2014                                                    0.4606
factor(year)2015                                                    0.4476
factor(year)2016                                                    0.4434
factor(year)2017                                                    0.4471
factor(year)2018                                                    0.4195
factor(year)2019                                                    0.4136
factor(year)2020                                                    0.4112
factor(year)2021                                                    0.4114
factor(year)2022                                                    0.4069
factor(year)2023                                                    0.3992
factor(year)2024                                                    0.3999
factor(month)2                                                      0.3339
factor(month)3                                                      0.3373
factor(month)4                                                      0.3392
factor(month)5                                                      0.3415
factor(month)6                                                      0.3534
factor(month)7                                                      0.3644
factor(month)8                                                      0.3571
factor(month)9                                                      0.3415
factor(month)10                                                     0.3301
factor(month)11                                                     0.3283
factor(month)12                                                     0.3302
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone      0.8175
factor(LZNAME)Coastal Medium Potential Farming Zone                 0.9022
factor(LZNAME)Grasslands Pastoral Zone                              0.9074
factor(LZNAME)Lake Turkana Fishing                                  0.9347
factor(LZNAME)Mandera Riverine Zone                                 1.5312
factor(LZNAME)Marsabit Marginal Mixed Farming Zone                  1.0093
factor(LZNAME)Northeastern Agropastoral Zone                        0.9129
factor(LZNAME)Northeastern Pastoral Zone                            0.8908
factor(LZNAME)Northern Pastoral Zone                                0.7198
factor(LZNAME)Northwestern Agropastoral Zone                        1.1030
factor(LZNAME)Northwestern Pastoral Zone                            0.7557
factor(LZNAME)Southeastern Marginal Mixed Farming Zone              0.7342
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone     0.8000
factor(LZNAME)Southeastern Pastoral  Zone                           0.9306
factor(LZNAME)Southern Agropastoral Zone                            0.7525
factor(LZNAME)Southern Pastoral Zone                                0.6878
factor(LZNAME)Tana Riverine Zone                                    1.0194
factor(LZNAME)Turkwell Riverine Zone                                0.9691
factor(LZNAME)Western Agropastoral Zone                             0.6765
factor(LZNAME)Western High Potential Zone                           0.9913
factor(LZNAME)Western Medium Potential Zone                         0.7859
                                                                t value
(Intercept)                                                      13.921
factor(year)2013                                                 -6.674
factor(year)2014                                                 -5.760
factor(year)2015                                                 -9.202
factor(year)2016                                                -10.224
factor(year)2017                                                  2.479
factor(year)2018                                                 -4.927
factor(year)2019                                                 -6.945
factor(year)2020                                                -15.678
factor(year)2021                                                -13.720
factor(year)2022                                                  6.190
factor(year)2023                                                 11.259
factor(year)2024                                                 -2.844
factor(month)2                                                    5.513
factor(month)3                                                    4.040
factor(month)4                                                   -2.627
factor(month)5                                                    0.674
factor(month)6                                                   -3.203
factor(month)7                                                   -4.710
factor(month)8                                                   -4.513
factor(month)9                                                   -3.864
factor(month)10                                                  -0.691
factor(month)11                                                  -0.885
factor(month)12                                                  -5.490
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone   -2.641
factor(LZNAME)Coastal Medium Potential Farming Zone              -5.797
factor(LZNAME)Grasslands Pastoral Zone                           10.469
factor(LZNAME)Lake Turkana Fishing                               21.166
factor(LZNAME)Mandera Riverine Zone                               6.783
factor(LZNAME)Marsabit Marginal Mixed Farming Zone                0.236
factor(LZNAME)Northeastern Agropastoral Zone                     17.617
factor(LZNAME)Northeastern Pastoral Zone                          9.050
factor(LZNAME)Northern Pastoral Zone                              2.263
factor(LZNAME)Northwestern Agropastoral Zone                      7.582
factor(LZNAME)Northwestern Pastoral Zone                         17.709
factor(LZNAME)Southeastern Marginal Mixed Farming Zone           -2.781
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone  -1.192
factor(LZNAME)Southeastern Pastoral  Zone                         2.973
factor(LZNAME)Southern Agropastoral Zone                         -4.793
factor(LZNAME)Southern Pastoral Zone                             -4.066
factor(LZNAME)Tana Riverine Zone                                 -2.521
factor(LZNAME)Turkwell Riverine Zone                             12.581
factor(LZNAME)Western Agropastoral Zone                           2.236
factor(LZNAME)Western High Potential Zone                       -10.673
factor(LZNAME)Western Medium Potential Zone                      -2.462
                                                                Pr(>|t|)    
(Intercept)                                                      < 2e-16 ***
factor(year)2013                                                2.49e-11 ***
factor(year)2014                                                8.40e-09 ***
factor(year)2015                                                 < 2e-16 ***
factor(year)2016                                                 < 2e-16 ***
factor(year)2017                                                0.013165 *  
factor(year)2018                                                8.38e-07 ***
factor(year)2019                                                3.81e-12 ***
factor(year)2020                                                 < 2e-16 ***
factor(year)2021                                                 < 2e-16 ***
factor(year)2022                                                6.04e-10 ***
factor(year)2023                                                 < 2e-16 ***
factor(year)2024                                                0.004452 ** 
factor(month)2                                                  3.53e-08 ***
factor(month)3                                                  5.36e-05 ***
factor(month)4                                                  0.008623 ** 
factor(month)5                                                  0.500148    
factor(month)6                                                  0.001359 ** 
factor(month)7                                                  2.48e-06 ***
factor(month)8                                                  6.41e-06 ***
factor(month)9                                                  0.000112 ***
factor(month)10                                                 0.489303    
factor(month)11                                                 0.375969    
factor(month)12                                                 4.03e-08 ***
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone  0.008258 ** 
factor(LZNAME)Coastal Medium Potential Farming Zone             6.78e-09 ***
factor(LZNAME)Grasslands Pastoral Zone                           < 2e-16 ***
factor(LZNAME)Lake Turkana Fishing                               < 2e-16 ***
factor(LZNAME)Mandera Riverine Zone                             1.18e-11 ***
factor(LZNAME)Marsabit Marginal Mixed Farming Zone              0.813059    
factor(LZNAME)Northeastern Agropastoral Zone                     < 2e-16 ***
factor(LZNAME)Northeastern Pastoral Zone                         < 2e-16 ***
factor(LZNAME)Northern Pastoral Zone                            0.023631 *  
factor(LZNAME)Northwestern Agropastoral Zone                    3.42e-14 ***
factor(LZNAME)Northwestern Pastoral Zone                         < 2e-16 ***
factor(LZNAME)Southeastern Marginal Mixed Farming Zone          0.005418 ** 
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone 0.233335    
factor(LZNAME)Southeastern Pastoral  Zone                       0.002953 ** 
factor(LZNAME)Southern Agropastoral Zone                        1.65e-06 ***
factor(LZNAME)Southern Pastoral Zone                            4.79e-05 ***
factor(LZNAME)Tana Riverine Zone                                0.011688 *  
factor(LZNAME)Turkwell Riverine Zone                             < 2e-16 ***
factor(LZNAME)Western Agropastoral Zone                         0.025341 *  
factor(LZNAME)Western High Potential Zone                        < 2e-16 ***
factor(LZNAME)Western Medium Potential Zone                     0.013830 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Approximate significance of smooth terms:
                                               edf Ref.df      F p-value    
s(averagetemperature6monthspreadmissiondate) 7.167  8.241  43.15  <2e-16 ***
s(lat)                                       8.966  9.000 477.28  <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

R-sq.(adj) =  0.122   Deviance explained = 12.2%
GCV = 761.24  Scale est. = 760.96    n = 171804
#9 month models

mod_gamrain9 = gam(all_gam ~ s(averagerainfall9monthspreadmissiondate)+factor(year) +factor(month) +factor(LZNAME) + s(lat), data = climateadmissionsdatasetfilter)
summary(mod_gamrain9)

Family: gaussian 
Link function: identity 

Formula:
all_gam ~ s(averagerainfall9monthspreadmissiondate) + factor(year) + 
    factor(month) + factor(LZNAME) + s(lat)

Parametric coefficients:
                                                                Estimate
(Intercept)                                                      12.0573
factor(year)2013                                                 -2.9857
factor(year)2014                                                 -2.7656
factor(year)2015                                                 -4.2671
factor(year)2016                                                 -4.5103
factor(year)2017                                                  0.5229
factor(year)2018                                                 -2.2077
factor(year)2019                                                 -3.0526
factor(year)2020                                                 -6.1473
factor(year)2021                                                 -5.7991
factor(year)2022                                                  2.1049
factor(year)2023                                                  4.1883
factor(year)2024                                                 -0.9400
factor(month)2                                                    0.5424
factor(month)3                                                   -0.6382
factor(month)4                                                   -2.8808
factor(month)5                                                   -0.8078
factor(month)6                                                   -0.8540
factor(month)7                                                   -1.1785
factor(month)8                                                   -1.2908
factor(month)9                                                   -2.2327
factor(month)10                                                  -1.3755
factor(month)11                                                  -0.2320
factor(month)12                                                  -1.6823
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone   -1.9486
factor(LZNAME)Coastal Medium Potential Farming Zone              -4.9075
factor(LZNAME)Grasslands Pastoral Zone                            7.2926
factor(LZNAME)Lake Turkana Fishing                               21.3336
factor(LZNAME)Mandera Riverine Zone                               6.8456
factor(LZNAME)Marsabit Marginal Mixed Farming Zone               -0.1639
factor(LZNAME)Northeastern Agropastoral Zone                     14.8326
factor(LZNAME)Northeastern Pastoral Zone                          5.6703
factor(LZNAME)Northern Pastoral Zone                              2.7233
factor(LZNAME)Northwestern Agropastoral Zone                      8.7709
factor(LZNAME)Northwestern Pastoral Zone                         13.1378
factor(LZNAME)Southeastern Marginal Mixed Farming Zone           -1.3856
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone  -0.9348
factor(LZNAME)Southeastern Pastoral  Zone                         1.9852
factor(LZNAME)Southern Agropastoral Zone                         -3.9571
factor(LZNAME)Southern Pastoral Zone                             -3.0681
factor(LZNAME)Tana Riverine Zone                                 -3.5420
factor(LZNAME)Turkwell Riverine Zone                             12.7228
factor(LZNAME)Western Agropastoral Zone                           2.0279
factor(LZNAME)Western High Potential Zone                       -10.8673
factor(LZNAME)Western Medium Potential Zone                      -2.2173
                                                                Std. Error
(Intercept)                                                         0.7811
factor(year)2013                                                    0.4689
factor(year)2014                                                    0.4604
factor(year)2015                                                    0.4473
factor(year)2016                                                    0.4422
factor(year)2017                                                    0.4485
factor(year)2018                                                    0.4192
factor(year)2019                                                    0.4127
factor(year)2020                                                    0.4133
factor(year)2021                                                    0.4112
factor(year)2022                                                    0.4070
factor(year)2023                                                    0.3990
factor(year)2024                                                    0.3994
factor(month)2                                                      0.3429
factor(month)3                                                      0.3564
factor(month)4                                                      0.3580
factor(month)5                                                      0.3421
factor(month)6                                                      0.3309
factor(month)7                                                      0.3293
factor(month)8                                                      0.3299
factor(month)9                                                      0.3424
factor(month)10                                                     0.3421
factor(month)11                                                     0.3284
factor(month)12                                                     0.3307
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone      0.8003
factor(LZNAME)Coastal Medium Potential Farming Zone                 0.8854
factor(LZNAME)Grasslands Pastoral Zone                              0.8773
factor(LZNAME)Lake Turkana Fishing                                  0.8864
factor(LZNAME)Mandera Riverine Zone                                 1.4842
factor(LZNAME)Marsabit Marginal Mixed Farming Zone                  0.9933
factor(LZNAME)Northeastern Agropastoral Zone                        0.9033
factor(LZNAME)Northeastern Pastoral Zone                            0.8573
factor(LZNAME)Northern Pastoral Zone                                0.6859
factor(LZNAME)Northwestern Agropastoral Zone                        1.0714
factor(LZNAME)Northwestern Pastoral Zone                            0.7282
factor(LZNAME)Southeastern Marginal Mixed Farming Zone              0.7113
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone     0.7836
factor(LZNAME)Southeastern Pastoral  Zone                           0.9089
factor(LZNAME)Southern Agropastoral Zone                            0.7479
factor(LZNAME)Southern Pastoral Zone                                0.6757
factor(LZNAME)Tana Riverine Zone                                    0.9961
factor(LZNAME)Turkwell Riverine Zone                                0.9338
factor(LZNAME)Western Agropastoral Zone                             0.6632
factor(LZNAME)Western High Potential Zone                           0.9805
factor(LZNAME)Western Medium Potential Zone                         0.7781
                                                                t value
(Intercept)                                                      15.437
factor(year)2013                                                 -6.368
factor(year)2014                                                 -6.007
factor(year)2015                                                 -9.539
factor(year)2016                                                -10.199
factor(year)2017                                                  1.166
factor(year)2018                                                 -5.267
factor(year)2019                                                 -7.396
factor(year)2020                                                -14.874
factor(year)2021                                                -14.103
factor(year)2022                                                  5.172
factor(year)2023                                                 10.497
factor(year)2024                                                 -2.353
factor(month)2                                                    1.581
factor(month)3                                                   -1.791
factor(month)4                                                   -8.046
factor(month)5                                                   -2.361
factor(month)6                                                   -2.581
factor(month)7                                                   -3.579
factor(month)8                                                   -3.912
factor(month)9                                                   -6.521
factor(month)10                                                  -4.021
factor(month)11                                                  -0.706
factor(month)12                                                  -5.088
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone   -2.435
factor(LZNAME)Coastal Medium Potential Farming Zone              -5.542
factor(LZNAME)Grasslands Pastoral Zone                            8.312
factor(LZNAME)Lake Turkana Fishing                               24.068
factor(LZNAME)Mandera Riverine Zone                               4.612
factor(LZNAME)Marsabit Marginal Mixed Farming Zone               -0.165
factor(LZNAME)Northeastern Agropastoral Zone                     16.420
factor(LZNAME)Northeastern Pastoral Zone                          6.614
factor(LZNAME)Northern Pastoral Zone                              3.970
factor(LZNAME)Northwestern Agropastoral Zone                      8.186
factor(LZNAME)Northwestern Pastoral Zone                         18.041
factor(LZNAME)Southeastern Marginal Mixed Farming Zone           -1.948
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone  -1.193
factor(LZNAME)Southeastern Pastoral  Zone                         2.184
factor(LZNAME)Southern Agropastoral Zone                         -5.291
factor(LZNAME)Southern Pastoral Zone                             -4.540
factor(LZNAME)Tana Riverine Zone                                 -3.556
factor(LZNAME)Turkwell Riverine Zone                             13.624
factor(LZNAME)Western Agropastoral Zone                           3.058
factor(LZNAME)Western High Potential Zone                       -11.083
factor(LZNAME)Western Medium Potential Zone                      -2.850
                                                                Pr(>|t|)    
(Intercept)                                                      < 2e-16 ***
factor(year)2013                                                1.92e-10 ***
factor(year)2014                                                1.90e-09 ***
factor(year)2015                                                 < 2e-16 ***
factor(year)2016                                                 < 2e-16 ***
factor(year)2017                                                0.243730    
factor(year)2018                                                1.39e-07 ***
factor(year)2019                                                1.41e-13 ***
factor(year)2020                                                 < 2e-16 ***
factor(year)2021                                                 < 2e-16 ***
factor(year)2022                                                2.32e-07 ***
factor(year)2023                                                 < 2e-16 ***
factor(year)2024                                                0.018614 *  
factor(month)2                                                  0.113769    
factor(month)3                                                  0.073313 .  
factor(month)4                                                  8.61e-16 ***
factor(month)5                                                  0.018214 *  
factor(month)6                                                  0.009862 ** 
factor(month)7                                                  0.000345 ***
factor(month)8                                                  9.14e-05 ***
factor(month)9                                                  7.01e-11 ***
factor(month)10                                                 5.80e-05 ***
factor(month)11                                                 0.479925    
factor(month)12                                                 3.63e-07 ***
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone  0.014900 *  
factor(LZNAME)Coastal Medium Potential Farming Zone             2.99e-08 ***
factor(LZNAME)Grasslands Pastoral Zone                           < 2e-16 ***
factor(LZNAME)Lake Turkana Fishing                               < 2e-16 ***
factor(LZNAME)Mandera Riverine Zone                             3.98e-06 ***
factor(LZNAME)Marsabit Marginal Mixed Farming Zone              0.868939    
factor(LZNAME)Northeastern Agropastoral Zone                     < 2e-16 ***
factor(LZNAME)Northeastern Pastoral Zone                        3.75e-11 ***
factor(LZNAME)Northern Pastoral Zone                            7.18e-05 ***
factor(LZNAME)Northwestern Agropastoral Zone                    2.71e-16 ***
factor(LZNAME)Northwestern Pastoral Zone                         < 2e-16 ***
factor(LZNAME)Southeastern Marginal Mixed Farming Zone          0.051424 .  
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone 0.232888    
factor(LZNAME)Southeastern Pastoral  Zone                       0.028946 *  
factor(LZNAME)Southern Agropastoral Zone                        1.22e-07 ***
factor(LZNAME)Southern Pastoral Zone                            5.62e-06 ***
factor(LZNAME)Tana Riverine Zone                                0.000377 ***
factor(LZNAME)Turkwell Riverine Zone                             < 2e-16 ***
factor(LZNAME)Western Agropastoral Zone                         0.002232 ** 
factor(LZNAME)Western High Potential Zone                        < 2e-16 ***
factor(LZNAME)Western Medium Potential Zone                     0.004376 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Approximate significance of smooth terms:
                                            edf Ref.df      F p-value    
s(averagerainfall9monthspreadmissiondate) 7.671  8.563  46.47  <2e-16 ***
s(lat)                                    8.976  9.000 515.65  <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

R-sq.(adj) =  0.122   Deviance explained = 12.2%
GCV = 753.66  Scale est. = 753.38    n = 170344
mod_gamtemp9 = gam(all_gam ~ s(averagetemperature9monthspreadmissiondate) +factor(year) +factor(month) +factor(LZNAME) + s(lat), data = climateadmissionsdatasetfilter)
summary(mod_gamtemp9)

Family: gaussian 
Link function: identity 

Formula:
all_gam ~ s(averagetemperature9monthspreadmissiondate) + factor(year) + 
    factor(month) + factor(LZNAME) + s(lat)

Parametric coefficients:
                                                                 Estimate
(Intercept)                                                      11.15942
factor(year)2013                                                 -3.06531
factor(year)2014                                                 -2.51015
factor(year)2015                                                 -4.04758
factor(year)2016                                                 -4.50570
factor(year)2017                                                  1.20311
factor(year)2018                                                 -2.08754
factor(year)2019                                                 -2.75020
factor(year)2020                                                 -6.39794
factor(year)2021                                                 -5.50398
factor(year)2022                                                  2.55998
factor(year)2023                                                  4.60057
factor(year)2024                                                 -1.04977
factor(month)2                                                    2.49952
factor(month)3                                                    2.40707
factor(month)4                                                    0.06644
factor(month)5                                                    0.88268
factor(month)6                                                   -0.68202
factor(month)7                                                   -1.29449
factor(month)8                                                   -1.22409
factor(month)9                                                   -1.13354
factor(month)10                                                  -0.45137
factor(month)11                                                  -0.79906
factor(month)12                                                  -2.30591
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone   -2.45680
factor(LZNAME)Coastal Medium Potential Farming Zone              -5.49115
factor(LZNAME)Grasslands Pastoral Zone                            9.03987
factor(LZNAME)Lake Turkana Fishing                               19.66357
factor(LZNAME)Mandera Riverine Zone                               9.20907
factor(LZNAME)Marsabit Marginal Mixed Farming Zone               -0.11384
factor(LZNAME)Northeastern Agropastoral Zone                     15.70715
factor(LZNAME)Northeastern Pastoral Zone                          7.43260
factor(LZNAME)Northern Pastoral Zone                              1.33724
factor(LZNAME)Northwestern Agropastoral Zone                      8.21498
factor(LZNAME)Northwestern Pastoral Zone                         13.09691
factor(LZNAME)Southeastern Marginal Mixed Farming Zone           -2.35519
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone  -1.19270
factor(LZNAME)Southeastern Pastoral  Zone                         2.45291
factor(LZNAME)Southern Agropastoral Zone                         -3.64836
factor(LZNAME)Southern Pastoral Zone                             -3.03483
factor(LZNAME)Tana Riverine Zone                                 -2.90381
factor(LZNAME)Turkwell Riverine Zone                             12.06455
factor(LZNAME)Western Agropastoral Zone                           1.25952
factor(LZNAME)Western High Potential Zone                       -10.74506
factor(LZNAME)Western Medium Potential Zone                      -2.08956
                                                                Std. Error
(Intercept)                                                        0.79614
factor(year)2013                                                   0.46964
factor(year)2014                                                   0.46071
factor(year)2015                                                   0.44752
factor(year)2016                                                   0.44346
factor(year)2017                                                   0.44687
factor(year)2018                                                   0.41949
factor(year)2019                                                   0.41306
factor(year)2020                                                   0.41124
factor(year)2021                                                   0.41141
factor(year)2022                                                   0.40680
factor(year)2023                                                   0.39910
factor(year)2024                                                   0.39975
factor(month)2                                                     0.33407
factor(month)3                                                     0.33584
factor(month)4                                                     0.33325
factor(month)5                                                     0.32970
factor(month)6                                                     0.33123
factor(month)7                                                     0.33162
factor(month)8                                                     0.33401
factor(month)9                                                     0.34242
factor(month)10                                                    0.35122
factor(month)11                                                    0.34526
factor(month)12                                                    0.33491
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone     0.81762
factor(LZNAME)Coastal Medium Potential Farming Zone                0.90225
factor(LZNAME)Grasslands Pastoral Zone                             0.90679
factor(LZNAME)Lake Turkana Fishing                                 0.93461
factor(LZNAME)Mandera Riverine Zone                                1.53014
factor(LZNAME)Marsabit Marginal Mixed Farming Zone                 1.00967
factor(LZNAME)Northeastern Agropastoral Zone                       0.91298
factor(LZNAME)Northeastern Pastoral Zone                           0.89024
factor(LZNAME)Northern Pastoral Zone                               0.71987
factor(LZNAME)Northwestern Agropastoral Zone                       1.10294
factor(LZNAME)Northwestern Pastoral Zone                           0.75596
factor(LZNAME)Southeastern Marginal Mixed Farming Zone             0.73442
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone    0.80009
factor(LZNAME)Southeastern Pastoral  Zone                          0.93039
factor(LZNAME)Southern Agropastoral Zone                           0.75298
factor(LZNAME)Southern Pastoral Zone                               0.68817
factor(LZNAME)Tana Riverine Zone                                   1.01916
factor(LZNAME)Turkwell Riverine Zone                               0.96897
factor(LZNAME)Western Agropastoral Zone                            0.67699
factor(LZNAME)Western High Potential Zone                          0.99196
factor(LZNAME)Western Medium Potential Zone                        0.78608
                                                                t value
(Intercept)                                                      14.017
factor(year)2013                                                 -6.527
factor(year)2014                                                 -5.448
factor(year)2015                                                 -9.044
factor(year)2016                                                -10.160
factor(year)2017                                                  2.692
factor(year)2018                                                 -4.976
factor(year)2019                                                 -6.658
factor(year)2020                                                -15.558
factor(year)2021                                                -13.378
factor(year)2022                                                  6.293
factor(year)2023                                                 11.527
factor(year)2024                                                 -2.626
factor(month)2                                                    7.482
factor(month)3                                                    7.167
factor(month)4                                                    0.199
factor(month)5                                                    2.677
factor(month)6                                                   -2.059
factor(month)7                                                   -3.904
factor(month)8                                                   -3.665
factor(month)9                                                   -3.310
factor(month)10                                                  -1.285
factor(month)11                                                  -2.314
factor(month)12                                                  -6.885
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone   -3.005
factor(LZNAME)Coastal Medium Potential Farming Zone              -6.086
factor(LZNAME)Grasslands Pastoral Zone                            9.969
factor(LZNAME)Lake Turkana Fishing                               21.039
factor(LZNAME)Mandera Riverine Zone                               6.018
factor(LZNAME)Marsabit Marginal Mixed Farming Zone               -0.113
factor(LZNAME)Northeastern Agropastoral Zone                     17.204
factor(LZNAME)Northeastern Pastoral Zone                          8.349
factor(LZNAME)Northern Pastoral Zone                              1.858
factor(LZNAME)Northwestern Agropastoral Zone                      7.448
factor(LZNAME)Northwestern Pastoral Zone                         17.325
factor(LZNAME)Southeastern Marginal Mixed Farming Zone           -3.207
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone  -1.491
factor(LZNAME)Southeastern Pastoral  Zone                         2.636
factor(LZNAME)Southern Agropastoral Zone                         -4.845
factor(LZNAME)Southern Pastoral Zone                             -4.410
factor(LZNAME)Tana Riverine Zone                                 -2.849
factor(LZNAME)Turkwell Riverine Zone                             12.451
factor(LZNAME)Western Agropastoral Zone                           1.860
factor(LZNAME)Western High Potential Zone                       -10.832
factor(LZNAME)Western Medium Potential Zone                      -2.658
                                                                Pr(>|t|)    
(Intercept)                                                      < 2e-16 ***
factor(year)2013                                                6.73e-11 ***
factor(year)2014                                                5.09e-08 ***
factor(year)2015                                                 < 2e-16 ***
factor(year)2016                                                 < 2e-16 ***
factor(year)2017                                                0.007097 ** 
factor(year)2018                                                6.48e-07 ***
factor(year)2019                                                2.78e-11 ***
factor(year)2020                                                 < 2e-16 ***
factor(year)2021                                                 < 2e-16 ***
factor(year)2022                                                3.12e-10 ***
factor(year)2023                                                 < 2e-16 ***
factor(year)2024                                                0.008638 ** 
factor(month)2                                                  7.35e-14 ***
factor(month)3                                                  7.68e-13 ***
factor(month)4                                                  0.841980    
factor(month)5                                                  0.007425 ** 
factor(month)6                                                  0.039491 *  
factor(month)7                                                  9.48e-05 ***
factor(month)8                                                  0.000248 ***
factor(month)9                                                  0.000932 ***
factor(month)10                                                 0.198750    
factor(month)11                                                 0.020647 *  
factor(month)12                                                 5.79e-12 ***
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone  0.002658 ** 
factor(LZNAME)Coastal Medium Potential Farming Zone             1.16e-09 ***
factor(LZNAME)Grasslands Pastoral Zone                           < 2e-16 ***
factor(LZNAME)Lake Turkana Fishing                               < 2e-16 ***
factor(LZNAME)Mandera Riverine Zone                             1.76e-09 ***
factor(LZNAME)Marsabit Marginal Mixed Farming Zone              0.910229    
factor(LZNAME)Northeastern Agropastoral Zone                     < 2e-16 ***
factor(LZNAME)Northeastern Pastoral Zone                         < 2e-16 ***
factor(LZNAME)Northern Pastoral Zone                            0.063224 .  
factor(LZNAME)Northwestern Agropastoral Zone                    9.50e-14 ***
factor(LZNAME)Northwestern Pastoral Zone                         < 2e-16 ***
factor(LZNAME)Southeastern Marginal Mixed Farming Zone          0.001342 ** 
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone 0.136038    
factor(LZNAME)Southeastern Pastoral  Zone                       0.008379 ** 
factor(LZNAME)Southern Agropastoral Zone                        1.27e-06 ***
factor(LZNAME)Southern Pastoral Zone                            1.03e-05 ***
factor(LZNAME)Tana Riverine Zone                                0.004383 ** 
factor(LZNAME)Turkwell Riverine Zone                             < 2e-16 ***
factor(LZNAME)Western Agropastoral Zone                         0.062819 .  
factor(LZNAME)Western High Potential Zone                        < 2e-16 ***
factor(LZNAME)Western Medium Potential Zone                     0.007857 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Approximate significance of smooth terms:
                                               edf Ref.df     F p-value    
s(averagetemperature9monthspreadmissiondate) 8.074  8.782  34.9  <2e-16 ***
s(lat)                                       8.966  9.000 476.4  <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

R-sq.(adj) =  0.121   Deviance explained = 12.2%
GCV = 761.48  Scale est. = 761.2     n = 171804
#then conflict

mod_gamconflict6a = gam(all_gam ~ s(sumconflict6monthspreadmissions)+factor(month) +factor(LZNAME) +s(lat), data = conflictdataset)
summary(mod_gamconflict6a)

Family: gaussian 
Link function: identity 

Formula:
all_gam ~ s(sumconflict6monthspreadmissions) + factor(month) + 
    factor(LZNAME) + s(lat)

Parametric coefficients:
                                                                Estimate
(Intercept)                                                      13.7804
factor(month)2                                                    4.0095
factor(month)3                                                   -0.2008
factor(month)4                                                   -2.7118
factor(month)5                                                    0.9228
factor(month)6                                                   -1.2826
factor(month)7                                                   -3.3331
factor(month)8                                                   -3.4968
factor(month)9                                                   -2.4845
factor(month)10                                                  -1.5458
factor(month)11                                                  -2.1133
factor(month)12                                                  -3.7778
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone   -6.4601
factor(LZNAME)Coastal Medium Potential Farming Zone              -7.1920
factor(LZNAME)Grasslands Pastoral Zone                           10.5640
factor(LZNAME)Lake Turkana Fishing                               19.6993
factor(LZNAME)Lake Victoria Fishing Zone                        -12.8289
factor(LZNAME)Mandera Riverine Zone                              11.1450
factor(LZNAME)Marsabit Marginal Mixed Farming Zone                4.7229
factor(LZNAME)Northeastern Agropastoral Zone                     18.9904
factor(LZNAME)Northeastern Pastoral Zone                          5.4609
factor(LZNAME)Northern Pastoral Zone                              3.1654
factor(LZNAME)Northwestern Agropastoral Zone                     11.7685
factor(LZNAME)Northwestern Pastoral Zone                         22.2134
factor(LZNAME)Southeastern Marginal Mixed Farming Zone           -2.7073
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone   3.8408
factor(LZNAME)Southeastern Pastoral  Zone                        -3.3628
factor(LZNAME)Southern Agropastoral Zone                         -4.9217
factor(LZNAME)Southern Pastoral Zone                             -2.9135
factor(LZNAME)Tana Riverine Zone                                 -1.4913
factor(LZNAME)Turkwell Riverine Zone                             23.1091
factor(LZNAME)Western Agropastoral Zone                           3.0039
factor(LZNAME)Western High Potential Zone                        -8.2580
factor(LZNAME)Western Lakeshore Marginal Mixed Farming Zone     -23.7617
factor(LZNAME)Western Medium Potential Zone                      -3.9637
                                                                Std. Error
(Intercept)                                                         0.9499
factor(month)2                                                      0.7514
factor(month)3                                                      0.7406
factor(month)4                                                      0.7380
factor(month)5                                                      0.7478
factor(month)6                                                      0.7470
factor(month)7                                                      0.7193
factor(month)8                                                      0.7263
factor(month)9                                                      0.7188
factor(month)10                                                     0.7135
factor(month)11                                                     0.6957
factor(month)12                                                     0.6885
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone      1.8161
factor(LZNAME)Coastal Medium Potential Farming Zone                 1.9124
factor(LZNAME)Grasslands Pastoral Zone                              1.8634
factor(LZNAME)Lake Turkana Fishing                                  1.5236
factor(LZNAME)Lake Victoria Fishing Zone                            1.7842
factor(LZNAME)Mandera Riverine Zone                                 2.7302
factor(LZNAME)Marsabit Marginal Mixed Farming Zone                  2.8302
factor(LZNAME)Northeastern Agropastoral Zone                        2.0479
factor(LZNAME)Northeastern Pastoral Zone                            1.8338
factor(LZNAME)Northern Pastoral Zone                                1.0425
factor(LZNAME)Northwestern Agropastoral Zone                        1.8641
factor(LZNAME)Northwestern Pastoral Zone                            0.9852
factor(LZNAME)Southeastern Marginal Mixed Farming Zone              1.1421
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone     1.0035
factor(LZNAME)Southeastern Pastoral  Zone                           2.0677
factor(LZNAME)Southern Agropastoral Zone                            1.1825
factor(LZNAME)Southern Pastoral Zone                                0.9202
factor(LZNAME)Tana Riverine Zone                                    2.8095
factor(LZNAME)Turkwell Riverine Zone                                1.5826
factor(LZNAME)Western Agropastoral Zone                             0.8168
factor(LZNAME)Western High Potential Zone                           1.6419
factor(LZNAME)Western Lakeshore Marginal Mixed Farming Zone         1.6212
factor(LZNAME)Western Medium Potential Zone                         1.1352
                                                                t value
(Intercept)                                                      14.507
factor(month)2                                                    5.336
factor(month)3                                                   -0.271
factor(month)4                                                   -3.674
factor(month)5                                                    1.234
factor(month)6                                                   -1.717
factor(month)7                                                   -4.634
factor(month)8                                                   -4.814
factor(month)9                                                   -3.457
factor(month)10                                                  -2.167
factor(month)11                                                  -3.038
factor(month)12                                                  -5.487
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone   -3.557
factor(LZNAME)Coastal Medium Potential Farming Zone              -3.761
factor(LZNAME)Grasslands Pastoral Zone                            5.669
factor(LZNAME)Lake Turkana Fishing                               12.929
factor(LZNAME)Lake Victoria Fishing Zone                         -7.190
factor(LZNAME)Mandera Riverine Zone                               4.082
factor(LZNAME)Marsabit Marginal Mixed Farming Zone                1.669
factor(LZNAME)Northeastern Agropastoral Zone                      9.273
factor(LZNAME)Northeastern Pastoral Zone                          2.978
factor(LZNAME)Northern Pastoral Zone                              3.036
factor(LZNAME)Northwestern Agropastoral Zone                      6.313
factor(LZNAME)Northwestern Pastoral Zone                         22.547
factor(LZNAME)Southeastern Marginal Mixed Farming Zone           -2.370
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone   3.827
factor(LZNAME)Southeastern Pastoral  Zone                        -1.626
factor(LZNAME)Southern Agropastoral Zone                         -4.162
factor(LZNAME)Southern Pastoral Zone                             -3.166
factor(LZNAME)Tana Riverine Zone                                 -0.531
factor(LZNAME)Turkwell Riverine Zone                             14.602
factor(LZNAME)Western Agropastoral Zone                           3.678
factor(LZNAME)Western High Potential Zone                        -5.029
factor(LZNAME)Western Lakeshore Marginal Mixed Farming Zone     -14.657
factor(LZNAME)Western Medium Potential Zone                      -3.492
                                                                Pr(>|t|)    
(Intercept)                                                      < 2e-16 ***
factor(month)2                                                  9.54e-08 ***
factor(month)3                                                  0.786255    
factor(month)4                                                  0.000239 ***
factor(month)5                                                  0.217178    
factor(month)6                                                  0.085986 .  
factor(month)7                                                  3.60e-06 ***
factor(month)8                                                  1.48e-06 ***
factor(month)9                                                  0.000548 ***
factor(month)10                                                 0.030272 *  
factor(month)11                                                 0.002384 ** 
factor(month)12                                                 4.10e-08 ***
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone  0.000375 ***
factor(LZNAME)Coastal Medium Potential Farming Zone             0.000170 ***
factor(LZNAME)Grasslands Pastoral Zone                          1.44e-08 ***
factor(LZNAME)Lake Turkana Fishing                               < 2e-16 ***
factor(LZNAME)Lake Victoria Fishing Zone                        6.56e-13 ***
factor(LZNAME)Mandera Riverine Zone                             4.47e-05 ***
factor(LZNAME)Marsabit Marginal Mixed Farming Zone              0.095169 .  
factor(LZNAME)Northeastern Agropastoral Zone                     < 2e-16 ***
factor(LZNAME)Northeastern Pastoral Zone                        0.002903 ** 
factor(LZNAME)Northern Pastoral Zone                            0.002397 ** 
factor(LZNAME)Northwestern Agropastoral Zone                    2.76e-10 ***
factor(LZNAME)Northwestern Pastoral Zone                         < 2e-16 ***
factor(LZNAME)Southeastern Marginal Mixed Farming Zone          0.017774 *  
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone 0.000130 ***
factor(LZNAME)Southeastern Pastoral  Zone                       0.103882    
factor(LZNAME)Southern Agropastoral Zone                        3.16e-05 ***
factor(LZNAME)Southern Pastoral Zone                            0.001545 ** 
factor(LZNAME)Tana Riverine Zone                                0.595558    
factor(LZNAME)Turkwell Riverine Zone                             < 2e-16 ***
factor(LZNAME)Western Agropastoral Zone                         0.000236 ***
factor(LZNAME)Western High Potential Zone                       4.94e-07 ***
factor(LZNAME)Western Lakeshore Marginal Mixed Farming Zone      < 2e-16 ***
factor(LZNAME)Western Medium Potential Zone                     0.000481 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Approximate significance of smooth terms:
                                     edf Ref.df     F p-value    
s(sumconflict6monthspreadmissions) 7.771  8.587  31.5  <2e-16 ***
s(lat)                             8.896  8.997 124.8  <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

R-sq.(adj) =  0.148   Deviance explained = 14.9%
GCV = 865.99  Scale est. = 865       n = 45156
mod_gamconflict12a = gam(all_gam ~ s(sumconflict12monthspreadmissions)+factor(month) +factor(LZNAME) +s(lat), data = conflictdataset)
summary(mod_gamconflict12a)

Family: gaussian 
Link function: identity 

Formula:
all_gam ~ s(sumconflict12monthspreadmissions) + factor(month) + 
    factor(LZNAME) + s(lat)

Parametric coefficients:
                                                                Estimate
(Intercept)                                                      15.1279
factor(month)2                                                    3.8521
factor(month)3                                                    1.0936
factor(month)4                                                   -1.5270
factor(month)5                                                   -0.9561
factor(month)6                                                   -1.9147
factor(month)7                                                   -4.1659
factor(month)8                                                   -3.1221
factor(month)9                                                   -3.7751
factor(month)10                                                  -3.4953
factor(month)11                                                  -2.1064
factor(month)12                                                  -3.5083
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone   -8.3661
factor(LZNAME)Coastal Medium Potential Farming Zone              -7.3460
factor(LZNAME)Grasslands Pastoral Zone                            7.3960
factor(LZNAME)Lake Turkana Fishing                               17.0247
factor(LZNAME)Lake Victoria Fishing Zone                        -15.8751
factor(LZNAME)Mandera Riverine Zone                              10.5579
factor(LZNAME)Marsabit Marginal Mixed Farming Zone                2.2841
factor(LZNAME)Northeastern Agropastoral Zone                     18.2072
factor(LZNAME)Northeastern Pastoral Zone                          5.8013
factor(LZNAME)Northern Pastoral Zone                              2.5815
factor(LZNAME)Northwestern Agropastoral Zone                      9.4224
factor(LZNAME)Northwestern Pastoral Zone                         18.2738
factor(LZNAME)Southeastern Marginal Mixed Farming Zone           -2.7347
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone   4.1704
factor(LZNAME)Southeastern Pastoral  Zone                        -5.8295
factor(LZNAME)Southern Agropastoral Zone                         -4.3572
factor(LZNAME)Southern Pastoral Zone                             -3.2065
factor(LZNAME)Tana Riverine Zone                                 -2.8865
factor(LZNAME)Turkwell Riverine Zone                             21.1376
factor(LZNAME)Western Agropastoral Zone                           1.7017
factor(LZNAME)Western High Potential Zone                        -8.2853
factor(LZNAME)Western Lakeshore Marginal Mixed Farming Zone     -26.5827
factor(LZNAME)Western Medium Potential Zone                      -5.5402
                                                                Std. Error
(Intercept)                                                         1.0428
factor(month)2                                                      0.7870
factor(month)3                                                      0.7900
factor(month)4                                                      0.7866
factor(month)5                                                      0.7724
factor(month)6                                                      0.7558
factor(month)7                                                      0.7709
factor(month)8                                                      0.7591
factor(month)9                                                      0.7463
factor(month)10                                                     0.7395
factor(month)11                                                     0.7447
factor(month)12                                                     0.7425
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone      2.2598
factor(LZNAME)Coastal Medium Potential Farming Zone                 2.3063
factor(LZNAME)Grasslands Pastoral Zone                              2.2167
factor(LZNAME)Lake Turkana Fishing                                  1.6514
factor(LZNAME)Lake Victoria Fishing Zone                            1.8727
factor(LZNAME)Mandera Riverine Zone                                 3.0164
factor(LZNAME)Marsabit Marginal Mixed Farming Zone                  3.0548
factor(LZNAME)Northeastern Agropastoral Zone                        2.4054
factor(LZNAME)Northeastern Pastoral Zone                            2.1527
factor(LZNAME)Northern Pastoral Zone                                1.1089
factor(LZNAME)Northwestern Agropastoral Zone                        2.0372
factor(LZNAME)Northwestern Pastoral Zone                            1.0745
factor(LZNAME)Southeastern Marginal Mixed Farming Zone              1.2439
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone     1.0724
factor(LZNAME)Southeastern Pastoral  Zone                           2.3905
factor(LZNAME)Southern Agropastoral Zone                            1.3719
factor(LZNAME)Southern Pastoral Zone                                1.0670
factor(LZNAME)Tana Riverine Zone                                    3.1931
factor(LZNAME)Turkwell Riverine Zone                                1.7235
factor(LZNAME)Western Agropastoral Zone                             0.8802
factor(LZNAME)Western High Potential Zone                           1.8334
factor(LZNAME)Western Lakeshore Marginal Mixed Farming Zone         1.7073
factor(LZNAME)Western Medium Potential Zone                         1.2225
                                                                t value
(Intercept)                                                      14.507
factor(month)2                                                    4.895
factor(month)3                                                    1.384
factor(month)4                                                   -1.941
factor(month)5                                                   -1.238
factor(month)6                                                   -2.533
factor(month)7                                                   -5.404
factor(month)8                                                   -4.113
factor(month)9                                                   -5.058
factor(month)10                                                  -4.727
factor(month)11                                                  -2.829
factor(month)12                                                  -4.725
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone   -3.702
factor(LZNAME)Coastal Medium Potential Farming Zone              -3.185
factor(LZNAME)Grasslands Pastoral Zone                            3.336
factor(LZNAME)Lake Turkana Fishing                               10.309
factor(LZNAME)Lake Victoria Fishing Zone                         -8.477
factor(LZNAME)Mandera Riverine Zone                               3.500
factor(LZNAME)Marsabit Marginal Mixed Farming Zone                0.748
factor(LZNAME)Northeastern Agropastoral Zone                      7.569
factor(LZNAME)Northeastern Pastoral Zone                          2.695
factor(LZNAME)Northern Pastoral Zone                              2.328
factor(LZNAME)Northwestern Agropastoral Zone                      4.625
factor(LZNAME)Northwestern Pastoral Zone                         17.007
factor(LZNAME)Southeastern Marginal Mixed Farming Zone           -2.199
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone   3.889
factor(LZNAME)Southeastern Pastoral  Zone                        -2.439
factor(LZNAME)Southern Agropastoral Zone                         -3.176
factor(LZNAME)Southern Pastoral Zone                             -3.005
factor(LZNAME)Tana Riverine Zone                                 -0.904
factor(LZNAME)Turkwell Riverine Zone                             12.264
factor(LZNAME)Western Agropastoral Zone                           1.933
factor(LZNAME)Western High Potential Zone                        -4.519
factor(LZNAME)Western Lakeshore Marginal Mixed Farming Zone     -15.570
factor(LZNAME)Western Medium Potential Zone                      -4.532
                                                                Pr(>|t|)    
(Intercept)                                                      < 2e-16 ***
factor(month)2                                                  9.89e-07 ***
factor(month)3                                                  0.166280    
factor(month)4                                                  0.052236 .  
factor(month)5                                                  0.215792    
factor(month)6                                                  0.011300 *  
factor(month)7                                                  6.55e-08 ***
factor(month)8                                                  3.92e-05 ***
factor(month)9                                                  4.25e-07 ***
factor(month)10                                                 2.29e-06 ***
factor(month)11                                                 0.004677 ** 
factor(month)12                                                 2.31e-06 ***
factor(LZNAME)Coastal Marginal Agricultural Mixed Farming Zone  0.000214 ***
factor(LZNAME)Coastal Medium Potential Farming Zone             0.001448 ** 
factor(LZNAME)Grasslands Pastoral Zone                          0.000849 ***
factor(LZNAME)Lake Turkana Fishing                               < 2e-16 ***
factor(LZNAME)Lake Victoria Fishing Zone                         < 2e-16 ***
factor(LZNAME)Mandera Riverine Zone                             0.000465 ***
factor(LZNAME)Marsabit Marginal Mixed Farming Zone              0.454624    
factor(LZNAME)Northeastern Agropastoral Zone                    3.84e-14 ***
factor(LZNAME)Northeastern Pastoral Zone                        0.007043 ** 
factor(LZNAME)Northern Pastoral Zone                            0.019913 *  
factor(LZNAME)Northwestern Agropastoral Zone                    3.76e-06 ***
factor(LZNAME)Northwestern Pastoral Zone                         < 2e-16 ***
factor(LZNAME)Southeastern Marginal Mixed Farming Zone          0.027917 *  
factor(LZNAME)Southeastern Medium Potential, Mixed Farming Zone 0.000101 ***
factor(LZNAME)Southeastern Pastoral  Zone                       0.014749 *  
factor(LZNAME)Southern Agropastoral Zone                        0.001495 ** 
factor(LZNAME)Southern Pastoral Zone                            0.002657 ** 
factor(LZNAME)Tana Riverine Zone                                0.366022    
factor(LZNAME)Turkwell Riverine Zone                             < 2e-16 ***
factor(LZNAME)Western Agropastoral Zone                         0.053215 .  
factor(LZNAME)Western High Potential Zone                       6.23e-06 ***
factor(LZNAME)Western Lakeshore Marginal Mixed Farming Zone      < 2e-16 ***
factor(LZNAME)Western Medium Potential Zone                     5.87e-06 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Approximate significance of smooth terms:
                                     edf Ref.df      F p-value    
s(sumconflict12monthspreadmissions) 7.32  8.245  28.27  <2e-16 ***
s(lat)                              8.90  8.997 105.65  <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

R-sq.(adj) =  0.146   Deviance explained = 14.7%
GCV = 843.25  Scale est. = 842.1     n = 37648
#plot GAMs for climate

plot(mod_gamrain3, ylim = c(-10, 20))

plot(mod_gamtemp3, ylim = c(-10, 20))

plot(mod_gamrain6, ylim = c(-10, 20))

plot(mod_gamtemp6, ylim = c(-10, 20))

plot(mod_gamrain9, ylim = c(-10, 20))

plot(mod_gamtemp9, ylim = c(-10, 20))

#plot GAMS for conflict


plot.gam(mod_gamconflict6a, ylim = c(-10, 20))

plot.gam(mod_gamconflict12a, ylim = c(-10, 20))

#check models so we can adjust them as needed

#rainfall models
gam.check(mod_gamrain3) 


Method: GCV   Optimizer: magic
Smoothing parameter selection converged after 11 iterations.
The RMS GCV score gradient at convergence was 8.876973e-05 .
The Hessian was positive definite.
Model rank =  63 / 63 

Basis dimension (k) checking results. Low p-value (k-index<1) may
indicate that k is too low, especially if edf is close to k'.

                                            k'  edf k-index p-value    
s(averagerainfall3monthspreadmissiondate) 9.00 5.78    1.00    0.34    
s(lat)                                    9.00 8.98    0.76  <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
gam.check(mod_gamrain6)


Method: GCV   Optimizer: magic
Smoothing parameter selection converged after 11 iterations.
The RMS GCV score gradient at convergence was 8.799809e-05 .
The Hessian was positive definite.
Model rank =  63 / 63 

Basis dimension (k) checking results. Low p-value (k-index<1) may
indicate that k is too low, especially if edf is close to k'.

                                            k'  edf k-index p-value    
s(averagerainfall6monthspreadmissiondate) 9.00 7.80    1.01    0.92    
s(lat)                                    9.00 8.98    0.52  <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
gam.check(mod_gamrain9)


Method: GCV   Optimizer: magic
Smoothing parameter selection converged after 11 iterations.
The RMS GCV score gradient at convergence was 8.844537e-05 .
The Hessian was positive definite.
Model rank =  63 / 63 

Basis dimension (k) checking results. Low p-value (k-index<1) may
indicate that k is too low, especially if edf is close to k'.

                                            k'  edf k-index p-value    
s(averagerainfall9monthspreadmissiondate) 9.00 7.67    0.94  <2e-16 ***
s(lat)                                    9.00 8.98    0.74  <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#temperature models

gam.check(mod_gamtemp3) 


Method: GCV   Optimizer: magic
Smoothing parameter selection converged after 10 iterations.
The RMS GCV score gradient at convergence was 0.0002064121 .
The Hessian was positive definite.
Model rank =  63 / 63 

Basis dimension (k) checking results. Low p-value (k-index<1) may
indicate that k is too low, especially if edf is close to k'.

                                               k'  edf k-index p-value    
s(averagetemperature3monthspreadmissiondate) 9.00 5.81    1.02    0.98    
s(lat)                                       9.00 8.96    0.76  <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
gam.check(mod_gamtemp6)


Method: GCV   Optimizer: magic
Smoothing parameter selection converged after 10 iterations.
The RMS GCV score gradient at convergence was 0.0002181726 .
The Hessian was positive definite.
Model rank =  63 / 63 

Basis dimension (k) checking results. Low p-value (k-index<1) may
indicate that k is too low, especially if edf is close to k'.

                                               k'  edf k-index p-value    
s(averagetemperature6monthspreadmissiondate) 9.00 7.17    1.00    0.51    
s(lat)                                       9.00 8.97    0.62  <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
gam.check(mod_gamtemp9)


Method: GCV   Optimizer: magic
Smoothing parameter selection converged after 10 iterations.
The RMS GCV score gradient at convergence was 0.000216564 .
The Hessian was positive definite.
Model rank =  63 / 63 

Basis dimension (k) checking results. Low p-value (k-index<1) may
indicate that k is too low, especially if edf is close to k'.

                                               k'  edf k-index p-value    
s(averagetemperature9monthspreadmissiondate) 9.00 8.07    1.01    0.83    
s(lat)                                       9.00 8.97    0.73  <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#conflict

gam.check(mod_gamconflict6a)


Method: GCV   Optimizer: magic
Smoothing parameter selection converged after 9 iterations.
The RMS GCV score gradient at convergence was 0.0005387856 .
The Hessian was positive definite.
Model rank =  53 / 53 

Basis dimension (k) checking results. Low p-value (k-index<1) may
indicate that k is too low, especially if edf is close to k'.

                                     k'  edf k-index p-value    
s(sumconflict6monthspreadmissions) 9.00 7.77    1.02    0.88    
s(lat)                             9.00 8.90    0.69  <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
gam.check(mod_gamconflict12a)


Method: GCV   Optimizer: magic
Smoothing parameter selection converged after 8 iterations.
The RMS GCV score gradient at convergence was 0.0003356744 .
The Hessian was positive definite.
Model rank =  53 / 53 

Basis dimension (k) checking results. Low p-value (k-index<1) may
indicate that k is too low, especially if edf is close to k'.

                                      k'  edf k-index p-value    
s(sumconflict12monthspreadmissions) 9.00 7.32    1.01    0.88    
s(lat)                              9.00 8.90    0.81  <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Based on these plots we will need to make some adjustments to the model such as considering a different fit, considering dropping outliers, and coding the outcome variable (global acute malnutrition) as categorical.

3.) Time period comparison

4.) Next steps

1.) We plan on adding the VIIRS monthly vegetation index (NDVI) as another climate predictor to this analysis.