Learn R Programming

eRm (version 0.15-5)

rsctrl: Controls for the Sampling Function

Description

Various parameters that control aspects of the random generation of binary matrices.

Usage

rsctrl(burn_in = 100, n_eff = 100, step = 16, seed = 0, tfixed = FALSE)

Arguments

burn_in
the number of sampled matrices to come close to a stationary distribution. The default is burn_in = 100. (The actual number is 2 * burn_in * step.)
n_eff
the number of effective matrices, i.e., the number of matrices to be generated by the sampling function rsampler. n_eff must be positive and not larger than 8191 ($2^{13}-1$). The de
step
controls the number number of void matrices generated in the the burn in process and when effective matrices are generated (see note below). The default is step = 16.
seed
is the indicator for the seed of the random number generator. Its value must be in the range 0 and 2147483646 (2**31-2). If the value of seed equals zero, a seed is generated by the sampling function
tfixed
logical, -- specifies if in case of a quadratic input matrix the diagonal is considered fixed (see note below). The default is tfixed = FALSE.

Value

  • A list of class RSctr with components burn_in, n_eff, step, seed, tfixed.,

encoding

UTF-8

See Also

rsampler

Examples

Run this code
ctr <- rsctrl(n_eff = 1, seed = 987654321)  # specify new controls
summary(ctr)

# incorrect specifications will lead to an error
ctr2 <- rsctrl(step = -3, n_eff = 10000)

Run the code above in your browser using DataLab