simulate.evmOpt {texmex} | R Documentation |
Simulate from a fitted evm object
Description
Simulate random numbers from a fitted evm object
Usage
## S3 method for class 'evmOpt'
simulate(object, nsim = 1, seed = NULL, param = NULL, ...)
## S3 method for class 'evmSim'
simulate(object, nsim = 1, seed = NULL, ...)
## S3 method for class 'evmBoot'
simulate(object, nsim = 1, seed = NULL, ...)
Arguments
object |
A fitted evm object having class 'evmOpt', 'evmSim' or 'evmBoot'. |
nsim |
The number of simulations to perform. Defaults to |
seed |
An integer to be passed to |
param |
Parameters to use in the random number generator. Defaults to
|
... |
Unused. |
Details
For simulate.evmSim
and simulate.evmBoot
, the parameters from
the Markov chains or bootstrap replicates are randomly permuted prior to
each set of simulated responses being computed. In this way, reusing the
same set of values is avoided.
Value
If nsim=1
, a vector or random numbers simulated from the
fitted model object. If nsim > 1
, a matrix with each column being a
set of simulated responses.
Author(s)
Paul Metcalfe, Harry Southworth
See Also
Examples
mod <- evm(rain, qu=.95)
hist(simulate(mod, 100))