Learn R Programming

MGDrivE2 (version 2.1.0)

calc_move_rate: Calculate Outbound Movement Rate

Description

Given P, the cumulative probability of moving before dying, and mu, the daily mortality rate, calculate the movement rate gamma to get P. The equation comes from integrating the competing risks and solving for gamma.

Usage

calc_move_rate(mu, P)

Value

numeric probability of movement

Arguments

mu

daily mortality rate

P

cumulative probability to move before dying

Examples

Run this code
  # parameters, see vignette MGDrivE2: One Node Lifecycle Dynamics
  theta <- list(qE = 1/4, nE = 2, qL = 1/3, nL = 3, qP = 1/6, nP = 2,
                muE = 0.05, muL = 0.15, muP = 0.05, muF = 0.09, muM = 0.09,
                beta = 16, nu = 1/(4/24) )

  # lets say a 70% chance to move over the entire lifespan
  rMoveRate <- calc_move_rate(mu = theta$muF, P = 0.70)

Run the code above in your browser using DataLab