Description Usage Arguments Details Value See Also Examples
Generate two-dimensional random deviates for a Monte Carlo computation of the integral
\int_{0}^{∞}dv f_{2}(v)\int_{0}^{∞} f_{1}(u)\ Φ(u\cdot v, (1 - u) \cdot v; λ, N^{\textrm{MNO}}, N^{\textrm{Reg}}).
The Monte Carlo technique makes use of stratified importance sampling.
1 |
nSim |
number of two-dimensional points to generate |
nStrata |
integer vector of length 2 with the number of strata in each dimension |
f1, |
f2 named lists with the prior marginal distributions of the two-dimensional points |
lambda |
numeric vector |
nMNO, |
nReg non-negative integer vectors |
The lengths of the input vectors nMNO
and nReg
must be equal and
independent of the length of the input vector lambda
. Notice that nSim
points are
generated for each of the length(nMNO)
\timeslength(lambda)
combinations so
that the final data.table has nSim
\timeslength(nMNO)
\timeslength(lambda)
rows.
The prior distributions are specified as named lists where the first component of each list must be the name of distribution ('unif', 'triang', 'degen', 'gamma') and the rest components must be named according to the name of the parameters of the random generator of the corresponding distribution according to:
unif: xMin
, xMax
for the minimum, maximum of the sampled interval.
degen: x0
for the degenerate value of the random variable.
triang: xMin
, xMax
, xMode
for minimum, maximum and mode (see
qtriang
).
gamma: scale
and shape
with the same meaning as in rgamma
.
genUV
returns a data.table with the (u,v) coordinates of each point
together with additional variables:
The common length of nMNO
and nReg
identifies the number of territorial
cells in which the number of individuals detected by the telecommunication network and
official data. The column cellID
identifies these territorial cells.
The length of lambda
identifies the number of parameters upon which the integral
will be computed in each cell. The column parID
identifies each of these input
parameters.
Stratum_u
and Stratum_v
jointly identify each stratum in which the region
of integration has been divided with the stratification.
runif
, qtriang
, rgamma
for related functions.
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.