Description Usage Arguments Value Author(s) See Also Examples
This function takes the mean μ_π_{ijt} of the estimated posterior distribution of π_{ijt} (the probability of movement from district i to district i in time t) and returns one stochastic realization of the connectivity matrix. Each stochastic realization is produced by returning the vector \boldsymbolπ_{i\{j\}t} from a Dirichlet distribution.
1 | sim.pi(mu, level)
|
mu |
a three dimensional array giving the mean of the posterior distribution for π_{ijt} |
level |
the level of the data for which to generate the stochastic realization of pi (e.g. destination-, route- or month-level) |
a numerical matrix (when level = 'route'
) with values between 0 and 1, where rows (all j destination districts) sum to 1
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.lambda()
,
sim.rho()
,
sim.tau()
1 2 3 | load('./output/gravity_model_8dists.Rdata') # Gravity model parameters
tmp <- get.param.vals(n.districts=8, name='pi', level='month', stats=s.grav)
pi.hat <- sim.connectivity(mu=tmp$mean)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.