Sample model parameters using `mvrnorm` or the `simpar` package
samplePars(file.mod, nsims, method, seed.R, format = "ext", as.fun)
A table with sampled model parameters
Path to model control stream. Will be used for both `NMreadExt()` and `NMreadCov()`, and extension will automatically be replaced by `.ext` and `.cov`.
Number of sets of parameter values to generate. Passed to `simpar`.
The sampling method. Options are "mvrnorm" and "simpar". Each have pros and cons. Notice that both methods are fully automated as long as ".ext" and ".cov" files are available.
seed value passed to set.seed().
The returned data set format "ext" (default) or "wide". "ext" is a long-format, similar to what `NMdata::NMreadExt()` returns.
The default is to return data as a data.frame. Pass a function (say `tibble::as_tibble`) in as.fun to convert to something else. If data.tables are wanted, use as.fun="data.table". The default can be configured using NMdataConf.
This function was originally create by Sanaya Shroff and Philip Delff for sampling using `simpar`. It has since been generalized to support sampling with `mvrnorm()` too.