Package 'GDILM.SEIRS'

Title: Spatial Modeling of Infectious Disease with Reinfection
Description: Geographically Dependent Individual Level Models (GDILMs) within the Susceptible-Exposed-Infectious-Recovered-Susceptible (SEIRS) framework are applied to model infectious disease transmission, incorporating reinfection dynamics. This package employs a likelihood based Monte Carlo Expectation Conditional Maximization (MCECM) algorithm for estimating model parameters. It also provides tools for GDILM fitting, parameter estimation, AIC calculation on real pandemic data, and simulation studies customized to user-defined model settings.
Authors: Amin Abed [aut, cre, cph] , Mahmoud Torabi [ths], Zeinab Mashreghi [ths]
Maintainer: Amin Abed <[email protected]>
License: MIT + file LICENSE
Version: 0.0.2
Built: 2024-12-08 06:35:56 UTC
Source: CRAN

Help Index


Hypothetical Datasets

Description

The primary function, GDILM_SEIRS_Par_Est, fits the Geographically Dependent Individual Level Model (GDILM) for infectious disease transmission incorporating reinfection dynamics within the SEIRS framework, using real-world data. It can be applied to any dataset with the appropriate structure, requiring two dataframes: data and adjacency_matrix, along with the necessary parameters. For illustration purposes, we provide two hypothetical examples of data and adjacency_matrix to demonstrate the structure of the inputs. These examples will also be used to illustrate how the function works in practice.

data

A data frame with 100 rows and 12 columns.

This hypothetical dataset demonstrates the structure required for the dataframe used in this package. The dataset for use with the package should adhere to the same column format and order but can include any number of rows, with each row representing an infected individual. The example dataset includes individual-level characteristics (e.g., age, infection status) and area-level characteristics (e.g., socioeconomic status, STI rate) for 100 individuals, each associated with a postal code. This dataset will be used as input in the example for the GDILM_SEIRS_Par_Est function.

Ave_Postal_Pop

Average population of each postal code

AverageAge

Average age of individuals within each postal code (individual-level data)

InfectedTime

Time of infection for each individual, represented as a numerical value from 1 to the end of the pandemic period

LAT

Latitude of the postal code

LONG

Longitude of the postal code

Label_NC_shape

The region number that the postal code belongs to, here assuming the study area is divided into five subregions

MaleRate

Rate of males in the population of the postal code (individual-level data)

NInfected

Number of infected individuals in the postal code

SES

Socioeconomic status indicator of the region to which the postal code belongs (area-level data)

STI

Sexually transmitted infection rate of the region that the postal code belongs to (area-level data)

SymptomRate

Rate of disease symptoms in the postal code (individual-level data), indicating whether individuals are symptomatic or asymptomatic

status

1 if the postal code is infected for the first time, and 0 if the postal code is reinfected

adjacency_matrix

A 5x5 matrix.

This hypothetical adjacency matrix is provided to illustrate the structure required for use with this package. The matrix used with the package should follow a similar format, maintaining the same layout but allowing for any number of regions. The adjacency matrix defines the neighborhood relationships between subregions in a hypothetical study area. In this example, it represents a spatial structure with five subregions, where each cell indicates the presence or absence of a connection between the corresponding subregions. The example for the GDILM_SEIRS_Par_Est function will use this matrix as input.

V1

Subregion 1: Represents the first subregion in the region under study

V2

Subregion 2: Represents the second subregion in the region under study

V3

Subregion 3: Represents the third subregion in the region under study

V4

Subregion 4: Represents the fourth subregion in the region under study

V5

Subregion 5: Represents the fifth subregion in the region under study

Value

Each cell in the matrix (e.g., between subregion 1 and subregion 2) represents the connection (typically 0 or 1) between the two subregions, where 1 indicates they are neighbors and 0 indicates they are not.


GDILM SEIRS for Real Data

Description

This function applies the Geographically Dependent Individual Level Model (GDILM) for infectious disease transmission, incorporating reinfection dynamics within the Susceptible-Exposed-Infectious-Recovered-Susceptible (SEIRS) framework, to real data. It employs a likelihood based Monte Carlo Expectation Conditional Maximization (MCECM) algorithm for parameter estimation and AIC calculation. This function requires two dataframes, named data and adjacency_matrix, along with the necessary parameters. Detailed information on the structure of these two datasets is provided in the package.

Usage

GDILM_SEIRS_Par_Est(
  data,
  adjacency_matrix,
  DimCovInf,
  DimCovSus,
  DimCovSusReInf,
  tau0,
  lambda0,
  alphaS0,
  delta0,
  alphaT0,
  InfPrd,
  IncPrd,
  NIterMC,
  NIterMCECM
)

Arguments

data

Dataset. The dataset should exactly match the data file in the data folder, including all the columns with the same names.

adjacency_matrix

Adjacency matrix representing the regions in the study area (0 if no connection between regions)

DimCovInf

Dimensions of the individual infectivity covariate

DimCovSus

Dimensions of the area-level susceptibility to initial infection covariate

DimCovSusReInf

Dimensions of the area-level susceptibility to reinfection covariate

tau0

Initial value for spatial precision

lambda0

Initial value for spatial dependence

alphaS0

Initial value for the susceptibility intercept

delta0

Initial value for the spatial decay parameter

alphaT0

Initial value for the infectivity intercept

InfPrd

Infectious period that can be obtained either from the literature or by fitting an SEIRS model to the data

IncPrd

Incubation period that can be obtained either from the literature or by fitting an SEIRS model to the data

NIterMC

Number of MCMC iterations

NIterMCECM

Number of MCECM iterations

Value

alphaS Estimate of alpha S

BetaCovInf Estimate of beta vector for the individual level infection covariate

BetaCovSus Estimate of beta vector for the areal susceptibility to first infection covariate

BetaCovSusReInf Estimate of beta vector for the areal susceptibility to reinfection covariate

alphaT Estimate of alpha T

delta Estimate of delta

tau1 Estimate of tau

lambda1 Estimate of lambda

AIC AIC of the fitted GDILM SEIRS

Examples

data(data)
data(adjacency_matrix)
GDILM_SEIRS_Par_Est(data,adjacency_matrix,2,2,2,0.5, 0.5, 1, 2, 1, 1, 1, 20, 2)

GDILM SEIRS for a Simulation Study

Description

This function conducts a simulation study for the Geographically Dependent Individual Level Model (GDILM) of infectious disease transmission, incorporating reinfection dynamics within the Susceptible-Exposed-Infectious-Recovered-Susceptible (SEIRS) framework, using a user-defined grid size. It applies a likelihood based Monte Carlo Expectation Conditional Maximization (MCECM) algorithm to estimate model parameters and compute the AIC.

Usage

GDILM_SEIRS_Sim_Par_Est(
  GridDim1,
  GridDim2,
  NPostPerGrid,
  MaxTimePand,
  tau0,
  lambda0,
  alphaS0,
  delta0,
  alphaT0,
  PopMin,
  PopMax,
  InfFraction,
  ReInfFraction,
  InfPrd,
  IncPrd,
  NIterMC,
  NIterMCECM
)

Arguments

GridDim1

First dimension of the grid

GridDim2

Second dimension of the grid

NPostPerGrid

Number of postal codes per grid cell

MaxTimePand

Last time point of the pandemic

tau0

Initial value for spatial precision

lambda0

Initial value for spatial dependence

alphaS0

Initial value for the susceptibility intercept

delta0

Initial value for the spatial decay parameter

alphaT0

Initial value for the infectivity intercept

PopMin

Minimum population per postal code

PopMax

Maximum population per postal code

InfFraction

Fraction of each grid cell's population to be infected

ReInfFraction

Fraction of each grid cell's population to be reinfected

InfPrd

Infectious period that can be obtained either from the literature or by fitting an SEIRS model to the data

IncPrd

Incubation period that can be obtained either from the literature or by fitting an SEIRS model to the data

NIterMC

Number of MCMC iterations

NIterMCECM

Number of MCECM iterations

Value

alphaS Estimate of alpha S

BetaCovInf Estimate of beta vector for the individual level infection covariate

BetaCovSus Estimate of beta vector for the areal susceptibility to first infection covariate

BetaCovSusReInf Estimate of beta vector for the areal susceptibility to reinfection covariate

alphaT Estimate of alpha T

delta Estimate of delta

tau1 Estimate of tau

lambda1 Estimate of lambda

AIC AIC of the fitted GDILM SEIRS

Examples

GDILM_SEIRS_Sim_Par_Est(3,3,8,30,0.7, 0.5, -1, 2.5, 0,30, 50,0.5,0.5, 2, 3, 10, 2)