ABSTRACT

This chapter shows how to fit a geostatistical model to predict malaria prevalence in The Gambia using the stochastic partial differential equation approach and the R-integrated nested Laplace approximation package. It utilises data of malaria prevalence in children obtained at 65 villages in The Gambia which are contained in the geoR package, and high-resolution environmental covariates downloaded with the raster package. The fixed effects are the intercept and a covariate. The random effect is the spatial Gaussian random field. The chapter shows how to create a triangulated mesh that covers The Gambia, the projection matrix and the data stacks to fit the model. It creates a data frame called containing, for each village, the coordinates, the total number of tests performed, the number of positive tests, and the malaria prevalence. An alternative to dplyr to calculate the number of positive tests in each village is to use the aggregate function.