Description Usage Arguments Value Author(s) See Also Examples
A function to simulate one stochastic realization of the decay rate lambda given the mean and standard deviation of the posterior distribution estimated by model of decay rate or a gravity model.
1 | sim.lambda(mu, sigma, level)
|
mu |
mean of posterior distribution of decay rate lambda |
sigma |
standard deviation of posterior distribution of decay rate lambda |
level |
the level of the data at which the mean and standard deviation of lambda are given (e.g. destination-, route- or month-level) |
a numerical matrix when level = 'route'
John Giles
Other simulation:
calc.hpd()
,
calc.prop.inf()
,
calc.prop.remain()
,
calc.timing.magnitude()
,
calc.wait.time()
,
decay.func()
,
get.age.beta()
,
get.beta.params()
,
sim.TSIR.full()
,
sim.TSIR()
,
sim.combine.dual()
,
sim.combine()
,
sim.gravity.duration()
,
sim.gravity()
,
sim.pi()
,
sim.rho()
,
sim.tau()
1 2 3 4 | load('./output/gravity_model_route_8dists.Rdata') # mod.grav # posterior estimates of gravity model parameters
tmp <- get.param.vals(n.districts=8, name='lambda', level='route', stats=mod.grav)
lambda.hat <- sim.lambda(mu=tmp$mean, sigma=tmp$sd, level='route')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.