u0_SISe {SimInf} | R Documentation

## Example data to initialize the ‘SISe’ model

### Description

Example data to initialize a population of 1600 nodes and demonstrate the `SISe` model.

### Usage

    u0_SISe()

### Details

A `data.frame` with the number of individuals in the ‘S’ and ‘I’ compartments in 1600 nodes. Note that the ‘I’ compartment is zero.

### Value

A `data.frame`

### Examples

    ## Create an 'SISe' model with 1600 nodes and initialize it to
    ## run over 4*365 days and record data at weekly time-points.

    ## Load the initial population and add ten infected individuals to
    ## the first node.
    u0 <- u0_SISe()
    u0$I[1] <- 10

    ## Define 'tspan' to run the simulation over 4*365 and record the
    ## state of the system at weekly time-points.
    tspan <- seq(from = 1, to = 4*365, by = 7)

    ## Load scheduled events for the population of nodes with births,
    ## deaths and between-node movements of individuals.
    events <- events_SISe()

    ## Create an 'SISe' model
    model <- SISe(u0 = u0, tspan = tspan, events = events_SISe(),
                  phi = 0, upsilon = 1.8e-2, gamma = 0.1, alpha = 1,
                  beta_t1 = 1.0e-1, beta_t2 = 1.0e-1, beta_t3 = 1.25e-1,
                  beta_t4 = 1.25e-1, end_t1 = 91, end_t2 = 182,
                  end_t3 = 273, end_t4 = 365, epsilon = 0)

    ## Run the model to generate a single stochastic trajectory.
    result <- run(model, threads = 1)

    ## Summarize trajectory
    summary(result)

    ## Plot the proportion of nodes with at least one infected
    ## individual.
    plot(prevalence(result, I~S+I, "nop"), type = "l")

[Package SimInf version 6.3.0 Index]