Assimilation of data (Bayesian) using optimal statistical inference, a modified Kalman Filter.
Usage
assimilateData(
layers,
linearInterpolationMatrix,
prevalenceData,
healthZoneCoordinates,
psi.diagonal,
QHt,
HQHt
)
Arguments
- layers
The SpatRaster object with layers Susceptible, Vaccinated, Exposed, Infected, Recovered, and Dead.
- linearInterpolationMatrix
a linear forward interpolation operator matrix with as many columns as cells in the SpatRaster layers, and as many rows as health zones for which coordinates are provided (when creating a matrix for use with one state vector). The matrix is either a trivial matrix as described elsewhere (see linearInterpolationOperator), or two partitions in a sparse, block diagonal matrix.
- prevalenceData
A "situation report" dataframe. The first column provides the date of the officially reported, observed incidence of the disease, in ISO format (YYYY-MM-DD). MAYBE TODO: enforce the startDate parameter to be one week prior to the first observed data?
Date Beni Biena Butembo Goma Kalunguta 05-Aug 3 0 2 0 0 12-Aug 2 0 0 0 0 20-Aug 1 0 0 0 0 26-Aug 5 0 0 0 0 02-Sep 8 0 0 0 1 09-Sep 5 0 2 0 0 16-Sep 5 0 3 0 0 23-Sep 4 0 1 0 0 02-Oct 10 0 1 0 0 07-Oct 14 0 4 0 0 15-Oct 28 0 2 0 1 21-Oct 19 0 3 0 0 28-Oct 28 0 8 0 0 04-Nov 16 0 6 0 1 11-Nov 14 0 0 0 21
- healthZoneCoordinates
a table of values giving the latitude and longitude coordinates for health zones in the country of interest. See the description of the healthZoneCoordinates argument in the function SVEIRD.BayesianDataAssimilation for more details.
HealthZone Latitude Longitude Alimbongo -0.365515 29.1911818 Beni 0.49113 29.47306 Biena 0.57923 29.115633 Butembo 0.140692 29.335014 Goma -1.658271 29.220132 Kalunguta 0.323085 29.354677 Katwa 0.116985 29.411838 Kayna -0.603936 29.174066 Kyondo -0.005622 29.408813 Lubero -0.15633 29.24057 Mabalako 0.461257 29.210687 Manguredjipa 0.353433 28.765479 Masereka -0.133333 29.333333 Musienene 0.04022 29.26246 Mutwanga 0.32893 29.74576 Nyiragongo -1.516667 29.25 Oicha 0.698681 29.518834 Pinga -0.9830504 28.687911 Vuhovi 0.1416 29.4075 Ariwara 3.136873 30.706615 Bunia 1.566667 30.25 Komanda 1.367496 29.774322 Lolwa 1.352969 29.498455 Mambasa 1.359731 29.029226 Mandima 1.35551 29.08173 Nyakunde 1.431271 30.029283 Rwampara 1.4053 30.3449 Tchomia 1.4412 30.4845
- psi.diagonal
A replacement value for elements of the Psi matrix' diagonal which are zero.
- QHt
the tcrossprod of the Q and H matrices.
- HQHt
the product of the H matrix and QHt.