Last data update: 2014.03.03

R: Simulate values from a Probability Distribution
simulate.normalR Documentation

Simulate values from a Probability Distribution

Description

Simulate independent values from a given probability distribution.

Usage

## S3 method for class 'normal'
simulate(object, nsim = 1, ...)
## S3 method for class 'binomialdistribution'
simulate(object, nsim = 1, ...)
## S3 method for class 'discretedistribution'
simulate(object, nsim = 1, ...)
## S3 method for class 'expgamma'
simulate(object, nsim = 1, ...)
## S3 method for class 'fdistribution'
simulate(object, nsim = 1, ...)
## S3 method for class 'gammadistribution'
simulate(object, nsim = 1, ...)
## S3 method for class 'mnormalexpgamma'
simulate(object, nsim = 1, ...)
## S3 method for class 'mnormalgamma'
simulate(object, nsim = 1, ...)
## S3 method for class 'mnormal'
simulate(object, nsim = 1, ...)
## S3 method for class 'mtdistribution'
simulate(object, nsim = 1, ...)
## S3 method for class 'normalexpgamma'
simulate(object, nsim = 1, ...)
## S3 method for class 'normalgamma'
simulate(object, nsim = 1, ...)
## S3 method for class 'poissondistribution'
simulate(object, nsim = 1, ...)
## S3 method for class 'tdistribution'
simulate(object, nsim = 1, ...)
## S3 method for class 'uniformdistribution'
simulate(object, nsim = 1, ...)

Arguments

object

The probability distribution to be simulated from.

nsim

The number of simulated values. Default is 1.

...

Additional parameters. Currently not in use.

Value

For univariate distributions, a vector of length nsim is produced. For multivariate distributions, a matrix with nsim rows is produced.

Author(s)

Petter Mostad <mostad@chalmers.se>

Examples

simulate(normal())
simulate(normal(), 10)
simulate(mnormal(), 10)

Results