Title: Spatiotemporal Modeling of Seasonal Infectious Disease
Version: 0.0.3
Description: Spatiotemporal individual-level model of seasonal infectious disease transmission within the Susceptible-Exposed-Infectious-Recovered-Susceptible (SEIRS) framework are applied to model seasonal infectious disease transmission. This package employs a likelihood based Monte Carlo Expectation Conditional Maximization (MCECM) algorithm for estimating model parameters. In addition to model fitting and parameter estimation, the package offers functions for calculating AIC using real pandemic data and conducting simulation studies customized to user-specified model configurations.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Imports: MASS, mvtnorm, ngspatial, stats
RoxygenNote: 7.3.2
Suggests: testthat (≥ 3.0.0)
Config/testthat/edition: 3
NeedsCompilation: no
Packaged: 2025-11-02 21:48:42 UTC; aminabed
Author: Amin Abed ORCID iD [aut, cre, cph], Mahmoud Torabi [ths], Zeinab Mashreghi [ths]
Maintainer: Amin Abed <abeda@myumanitoba.ca>
Depends: R (≥ 3.5.0)
Repository: CRAN
Date/Publication: 2025-11-02 23:00:02 UTC

Hypothetical Datasets

Description

The main function, SeasEpi_Par_Est, applies the spatiotemporal individual-level model of seasonal infectious disease transmission within the SEIRS framework to a hypothetical dataset. It is compatible with any dataset that follows the required format, which includes two dataframes: data and adjacency_matrix, along with relevant parameter inputs. To demonstrate the expected input structure and the function’s practical use, we provide two hypothetical examples of data and adjacency_matrix.

data

A data frame with 100 rows and 11 columns.

This sample dataset illustrates the required structure for the dataframe used with this package. While the number of rows can vary, each row must represent a single infected individual, and the column names and order must follow the specified format. The example includes individual-level attributes (e.g., age, infection status) as well as area-level information (e.g., socioeconomic status) for 100 individuals, each linked to a postal code. This dataset will serve as input in the example demonstrating the SeasEpi_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

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 SeasEpi_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.


SeasEpi for Real Data

Description

This function applies the spatiotemporal individual-level model of seasonal infectious disease transmission 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

SeasEpi_Par_Est(
  data,
  adjacency_matrix,
  DimCovInf,
  DimCovSus,
  tau0,
  lambda0,
  alphaS0,
  delta0,
  alphaT0,
  InfPrd,
  IncPrd,
  NIterMC,
  NIterMCECM,
  zeta10,
  zeta20,
  T_cycle
)

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

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

zeta10

Initial value for the amplitude of the seasonal oscillation parameter (sin part)

zeta20

Initial value for the phase of the seasonal oscillation parameter (cos part)

T_cycle

The duration of a complete seasonal cycle (e.g., 12 months for an annual cycle)

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

alphaT Estimate of alpha T

delta Estimate of delta

zeta1 Estimate of zeta1

zeta2 Estimate of zeta2

tau1 Estimate of tau

lambda1 Estimate of lambda

AIC AIC of the fitted GDILM SEIRS

Examples


data(data)
data(adjacency_matrix)
SeasEpi_Par_Est(data,adjacency_matrix,2,2,0.5, 0.5, 1, 0.1, 1, 1, 1, 20, 2,0.2,0.2,5)



SeasEpi for a Simulation Study

Description

This function conducts a simulation study for spatiotemporal individual-level model of seasonal infectious disease transmission 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

SeasEpi_Sim_Par_Est(
  GridDim1,
  GridDim2,
  NPostPerGrid,
  MaxTimePand,
  tau0,
  lambda0,
  alphaS0,
  delta0,
  alphaT0,
  PopMin,
  PopMax,
  InfFraction,
  InfPrd,
  IncPrd,
  NIterMC,
  NIterMCECM,
  zeta10,
  zeta20,
  T_cycle
)

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

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

zeta10

Initial value for the amplitude of the seasonal oscillation parameter (sin part)

zeta20

Initial value for the phase of the seasonal oscillation parameter (cos part)

T_cycle

The duration of a complete seasonal cycle (e.g., 12 months for an annual cycle)

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

alphaT Estimate of alpha T

delta Estimate of delta

zeta1 Estimate of zeta1

zeta2 Estimate of zeta2

tau1 Estimate of tau

lambda1 Estimate of lambda

AIC AIC of the fitted GDILM SEIRS

Examples


SeasEpi_Sim_Par_Est(5,5,10,30,0.7, 0.7, -1, 0.1, 0,40, 50,0.6, 5, 5, 10, 3,0.2,0.2,5)


mirror server hosted at Truenetwork, Russian Federation.