rates: General Epidemic Process

Description Usage Details

View source: R/General_Epidemic_Simulation.R

Description

To have one algorithm which deals with all constructions of an Epidemic. For example, to be able to deal with; Multiple States The mechanics of transitioning between these states Track when events happen and what the nature of the event was. How many states? How do individuals transition between these states? Is it affected by the make up of other states? How do you choose which event is next?

Usage

1
rates(parameters, kernels)

Details

Choosing when next event is easy, E ~ exp(Total_rate_of_events)

Choosing which event occurs is also okay, use sample with the individual transition rates and use the index thrown out to chose which event occurs and which individual it happens to.

(Homogeneous SIR context) There are k states. (3 states) Want to be able to name these states to give them meaning. (Susceptible, Infectious, Removed)

Specify the mechanics of transitioning between these states (S —> (beta) I —> (gamma) R)

Be able to draw the time of the next event (E ~ exp(total_inf_rate + total_rem_rate))

Specify the probabilities of an event occuring and possibly which individual this event happens to. (sample(c(S, I), prob = c(rep(length(I)*beta, length(S)), rep(gamma, length(I)))))

Simply an object that will tell the algorithm what state an individual is in at this particular time point. A list object which will hold the parameters for each transition process

A list of objects which will hold all the information about the rates at which an individual transitions from one state to another.

If the transition from one state to another is homogenous (i.e the same for all individuals, the the object will be the parameters of the process)

If the process depends on the relationship between individuals and aspects of themselves, the object will be a (Sparse) Matrix.

Use kernels to assist computing the rates


JMacDonaldPhD/Epidemics documentation built on Jan. 10, 2020, 2:48 a.m.