Simulate independent values from a given probability distribution.
# S3 method for normal
simulate(object, nsim = 1, ...)
# S3 method for binomialdistribution
simulate(object, nsim = 1, ...)
# S3 method for discretedistribution
simulate(object, nsim = 1, ...)
# S3 method for expgamma
simulate(object, nsim = 1, ...)
# S3 method for fdistribution
simulate(object, nsim = 1, ...)
# S3 method for gammadistribution
simulate(object, nsim = 1, ...)
# S3 method for mnormalexpgamma
simulate(object, nsim = 1, ...)
# S3 method for mnormalgamma
simulate(object, nsim = 1, ...)
# S3 method for mnormal
simulate(object, nsim = 1, ...)
# S3 method for mtdistribution
simulate(object, nsim = 1, ...)
# S3 method for normalexpgamma
simulate(object, nsim = 1, ...)
# S3 method for normalgamma
simulate(object, nsim = 1, ...)
# S3 method for poissondistribution
simulate(object, nsim = 1, ...)
# S3 method for tdistribution
simulate(object, nsim = 1, ...)
# S3 method for uniformdistribution
simulate(object, nsim = 1, ...)
The probability distribution to be simulated from.
The number of simulated values. Default is 1.
Additional parameters. Currently not in use.
For univariate distributions, a vector of length nsim
is produced.
For multivariate distributions, a matrix with nsim
rows is
produced.
# NOT RUN {
simulate(normal())
simulate(normal(), 10)
simulate(mnormal(), 10)
# }
Run the code above in your browser using DataLab