Description Usage Arguments Details Value Author(s) Examples
The function runs simulations of the user-defined statistical model either for a single parameter or a list of parameters.
1 2 3 |
sim |
user supplied simulation function |
... |
arguments passed to ' |
nsim |
number of simulation replications at each parameter |
X |
list or matrix of model parameters |
mode |
type of return value: " |
cl |
cluster object, |
iseed |
integer seed for initializing the cluster workers |
na.rm |
whether to remove |
verbose |
if |
Basically, the given simulation function 'sim
' is called for each parameter value
'nsim
' times and the results are returned depending on the chosen type 'mode
'.
If 'X
' is NULL
(default), then the design, that is, the matrix of sample points, is first generated
by multiDimLHS
and the result is stored as an attribute named 'X
'. In this case, the arguments
'N
','bounds
' and 'method
' must be given as named input arguments as required by multiDimLHS
.
In case of catched errors, the function tries to omit the corresponding simulation runs from the final results if possible.
Depending on the complexity of the model simulations we strongly encourage the use of a cluster object 'cl
'. Make sure
to export all functions to the cluster environment beforehand which are required by the user-defined simulation function.
Also, using the option 'qle.cache
' caches results of a function call to be stored in the current working directory.
The filename is generated by a hash code using the digest
package. Setting an integer seed iseed
before
stores each result in a separate file and makes the data reproducible while loading the data again.
List of (aggregated) simulation results of class simQL
and the following attributes:
X |
matrix of sample points (equal to ' |
nsim |
number of simulation runs at each parameter |
iseed |
an integer seed value to initialize cluster workers |
error |
only in case of errors detected in simulation function |
M. Baaske
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.