genUV: Generation of two-dimensional random deviates.

Description Usage Arguments Details Value See Also Examples

Description

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.

Usage

1
genUV(nSim, nStrata, f1, f2, lambda, nMNO, nReg)

Arguments

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

Details

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:

Value

genUV returns a data.table with the (u,v) coordinates of each point together with additional variables:

See Also

runif, qtriang, rgamma for related functions.

Examples

1
2
3
4
5
# This data.table must have 10x5x3= 150 rows and only one stratum
genUV(nSim = 10, nStrata = c(1, 1),
      f1 = list('unif', xMin = 0.3, xMax = 0.5), f2 = list('gamma', shape = 11, scale = 12),
      lambda = seq(0, 1, length.out = 5),
      nMNO = c(20, 17, 25), nReg = c(115, 123, 119))

MobilePhoneESSnetBigData/pestim documentation built on May 31, 2019, 2:44 p.m.