Title: Spatial Modeling of Infectious Diseases with Co-Variate Error
Version: 1.2.1
Description: Provides tools for simulating from spatial modeling of individual level of infectious disease transmission when co-variates measured with error, and carrying out infectious disease data analyses with the same models. The epidemic models considered are distance-based model within Susceptible-Infectious-Removed (SIR) compartmental frameworks.
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.3.1
Imports: MASS, corpcor, mvtnorm, ngspatial, numDeriv, stats, psych
Depends: R (≥ 2.10)
LazyData: true
NeedsCompilation: no
Packaged: 2024-07-06 14:41:34 UTC; ruwan
Author: Ruwani Herath [aut, cre], Leila Amiri [ctb], Mahmoud Torabi [ctb]
Maintainer: Ruwani Herath <ruwanirasanjalih@gmail.com>
Repository: CRAN
Date/Publication: 2024-07-09 15:20:06 UTC

Areal level data

Description

The data which describes the areal level data (proportion of indigenous people and population) for 25 regions.

Usage

Areal_level_data

Format

A data frame with 25 rows and 2 columns:

Region

Region number

Pop

Population of each region

Ind

percentage of indigenous people in each region

...


Estimating parameters along with corresponding variances based on the proposed model.

Description

Estimating parameters along with corresponding variances based on the proposed model.

Usage

Estimation(
  ITER,
  MHiteration,
  eps,
  d,
  nSample,
  mm,
  time,
  MuxStar0,
  MuxInd0,
  SigmaxStar0,
  SigmaxInd0,
  Sigmav0,
  Sigmaw0,
  lambda0,
  sigma0,
  delta0,
  alpha0,
  beta10,
  beta20,
  beta30,
  beta40,
  InfPeriod,
  g
)

Arguments

ITER

The number of simulation runs

MHiteration

The number of iterations in Metropolis–Hastings algorithm

eps

Stopping value for MCECM algorithm

d

distance between cells

nSample

number of sample in each cell

mm

Number of areas.

time

Maximum time.

MuxStar0

Mean of unobserved areal level covariates.

MuxInd0

Mean of unobserved individual level covariates.

SigmaxStar0

Variance of unobserved areal level covariates.

SigmaxInd0

Variance of unobserved individual level covariates.

Sigmav0

Variance of areal level measurement error variable.

Sigmaw0

Variance of individual level measurement error variable.

lambda0

Spatial dependency parameter.

sigma0

Over dispersion parameter.

delta0

The spatial parameter.

alpha0

Initial value for intercept.

beta10

Initial value for coefficient of observed individual level covariates.

beta20

Initial value for coefficient of observed areal level covariates.

beta30

Initial value for coefficient of unobserved individual level covariates.

beta40

Initial value for coefficient of unobserved areal level covariates.

InfPeriod

The infectious period length.

g

grid dimension

Value

the result of the function

Examples

Estimation(1,5,0.05,2,4,4,20,0,0,1,1,0.3,0.3,0.5,0.5,2.5,0,1,1,1,
1,3,2)

Estimating parameters along with corresponding variances based on the proposed model with real data.

Description

Estimating parameters along with corresponding variances based on the proposed model with real data.

Usage

Estimation_RealData(
  ITER,
  MHiteration,
  eps,
  mm,
  time,
  MuxStar0,
  MuxInd0,
  SigmaxStar0,
  SigmaxInd0,
  Sigmav0,
  Sigmaw0,
  lambda0,
  sigma0,
  delta0,
  alpha0,
  beta10,
  beta20,
  beta30,
  beta40,
  InfPeriod,
  Di,
  D,
  Nlabel,
  n,
  cov1,
  cov2,
  ww,
  vv,
  tau
)

Arguments

ITER

The number of simulation runs

MHiteration

The number of iterations in Metropolis–Hastings algorithm

eps

Stopping value for MCECM algorithm

mm

Number of areas.

time

Maximum time.

MuxStar0

Mean vector of unobserved areal level covariates.

MuxInd0

Mean vector of unobserved individual level covariates.

SigmaxStar0

Variance of unobserved areal level covariates.

SigmaxInd0

Variance of unobserved individual level covariates.

Sigmav0

Variance of areal level measurement error variable.

Sigmaw0

Variance of individual level measurement error variable.

lambda0

Spatial dependency parameter.

sigma0

Over dispersion parameter.

delta0

The spatial parameter.

alpha0

Initial value for intercept.

beta10

Initial value for coefficient of observed individual level covariates.

beta20

Initial value for coefficient of observed areal level covariates.

beta30

Initial value for coefficient of unobserved individual level covariates.

beta40

Initial value for coefficient of unobserved areal level covariates.

InfPeriod

The infectious period length.

Di

Euclidean distance between individuals

D

Neibourhood structure

Nlabel

Label for each sample from the area

n

Total number of individuals

cov1

observed individual level covariates

cov2

observed areal level covariates

ww

Unobserved individual level covariates

vv

unobserved areal level covariates

tau

tau

Value

the result of the function

Examples

Estimation_RealData(1,5,0.05,4,20,0.1,0.1,0.15,0.8,0.6,0.6,0.85,
1.1,2.7,0,1,0,1,1,3,
matrix(runif(900,min = 4,max = 20),nrow=30, byrow = TRUE),
matrix(c(2,-1,-1,0,-1,2,0,-1,-1,0,2,-1,0,-1,-1,2),nrow=4,byrow=TRUE),
rep(1:4,c(7,6,8,9)),30,runif(30, 0, 1),
runif(4,0,1),runif(30,-2,2),runif(4,0,1),sample(c(0,1),replace = TRUE, size = 30))

Individual level data

Description

The data which describes the Individual level data (average age below 5, average age above 65 and SEFI factor) for 758 individuals.

Usage

Individual_level_data

Format

A data frame with 758 rows and 4 columns:

Index

Index for individual

Ave_Age_5

Average of age smaller than 5

Ave_Age_65

Average of age higher 65

SEFI

SEFI factor

...


Estimating parameters along with corresponding variances based on Naive model.

Description

Estimating parameters along with corresponding variances based on Naive model.

Usage

NaiveEstimation(
  ITER,
  MHiteration,
  eps,
  d,
  nSample,
  mm,
  time,
  MuxStar0,
  MuxInd0,
  SigmaxStar0,
  SigmaxInd0,
  Sigmav0,
  Sigmaw0,
  lambda0,
  sigma0,
  delta0,
  alpha0,
  beta10,
  beta20,
  beta30,
  beta40,
  InfPeriod,
  g
)

Arguments

ITER

The number of simulation runs

MHiteration

The number of iterations in Metropolis–Hastings algorithm

eps

Stopping value for MCECM algorithm

d

distance between cells

nSample

number of sample in each cell

mm

Number of areas.

time

Maximum time.

MuxStar0

Mean of unobserved areal level covariates.

MuxInd0

Mean of unobserved individual level covariates.

SigmaxStar0

Variance of unobserved areal level covariates.

SigmaxInd0

Variance of unobserved individual level covariates.

Sigmav0

Variance of areal level measurement error variable.

Sigmaw0

Variance of individual level measurement error variable.

lambda0

Spatial dependency parameter.

sigma0

Over dispersion parameter.

delta0

The spatial parameter.

alpha0

Initial value for intercept.

beta10

Initial value for coefficient of observed individual level covariates.

beta20

Initial value for coefficient of observed areal level covariates.

beta30

Initial value for coefficient of unobserved individual level covariates.

beta40

Initial value for coefficient of unobserved areal level covariates.

InfPeriod

The infectious period length.

g

grid dimension

Value

The results of the function

Examples

NaiveEstimation(1,5,0.05,2,4,4,20,0,0,1,1,0.3,0.3,0.5,0.5,2.5,0,1,
1,1,1,3,2)



Estimating parameters along with corresponding variances based on Naive model with real data.

Description

Estimating parameters along with corresponding variances based on Naive model with real data.

Usage

NaiveEstimation_RealData(
  ITER,
  MHiteration,
  eps,
  mm,
  time,
  MuxStar0,
  MuxInd0,
  SigmaxStar0,
  SigmaxInd0,
  Sigmav0,
  Sigmaw0,
  lambda0,
  sigma0,
  delta0,
  alpha0,
  beta10,
  beta20,
  beta30,
  beta40,
  InfPeriod,
  Di,
  D,
  Nlabel,
  n,
  cov1,
  cov2,
  ww,
  vv,
  tau
)

Arguments

ITER

The number of simulation runs

MHiteration

The number of iterations in Metropolis–Hastings algorithm

eps

Stopping value for MCECM algorithm

mm

Number of areas.

time

Maximum time.

MuxStar0

Mean vector of unobserved areal level covariates.

MuxInd0

Mean vector of unobserved individual level covariates.

SigmaxStar0

Variance of unobserved areal level covariates.

SigmaxInd0

Variance of unobserved individual level covariates.

Sigmav0

Variance of areal level measurement error variable.

Sigmaw0

Variance of individual level measurement error variable.

lambda0

Spatial dependency parameter.

sigma0

Over dispersion parameter.

delta0

The spatial parameter.

alpha0

Initial value for intercept.

beta10

Initial value for coefficient of observed individual level covariates.

beta20

Initial value for coefficient of observed areal level covariates.

beta30

Initial value for coefficient of unobserved individual level covariates.

beta40

Initial value for coefficient of unobserved areal level covariates.

InfPeriod

The infectious period length.

Di

Euclidean distance between individuals

D

Neibourhood structure

Nlabel

Label for each sample from the area

n

Total number of individuals

cov1

observed individual level covariates

cov2

observed areal level covariates

ww

Unobserved individual level covariates

vv

unobserved areal level covariates

tau

tau

Value

The results of the function

Examples

NaiveEstimation_RealData(1,5,0.05,4,20,0.1,0.1,0.15,0.8,0.6,0.6,
0.85,1.1,2.7,0,1,0,1,1,3,
matrix(runif(900,min = 4,max = 20),nrow=30, byrow = TRUE),
matrix(c(2,-1,-1,0,-1,2,0,-1,-1,0,2,-1,0,-1,-1,2),nrow=4,byrow=TRUE),
rep(1:4,c(7,6,8,9)),30,runif(30, 0, 1),
runif(4,0,1),runif(30,-2,2),runif(4,0,1),
sample(c(0,1),replace = TRUE, size = 30))



Regional data

Description

The data which describes the individual level data and areal data for 758 individuals.

Usage

Regional_data

Format

A data frame with 758 rows and 7 columns:

Index

Index for individual

Lat

Latitude of the area

Long

Longitude of the area

Population

Population of each area

SEFI

SEFI factor

Age_5

Number of individuals age below 5

Age_65

Number of individuals age above 65

...