NMsim_VarCov function

Simulate with parameter values sampled from a covariance step

Simulate with parameter values sampled from a covariance step

Like NMsim_default but $THETA, $OMEGA, and SIGMA are drawn from distribution estimated in covariance step. A successful covariance step must be available from the estimation. In case the simulation leads to negative diagonal elements in OMEGAandOMEGA and SIGMA, those values are truncated at zero. For simulation with parameter variability based on bootstrap results, use NMsim_default.

This function does not run any simulations. To simulate, using this method, see NMsim().

NMsim_VarCov(file.sim, file.mod, data.sim, nsims, ext, write.ext = NULL, ...)

Arguments

  • file.sim: The path to the control stream to be edited. This function overwrites the contents of the file pointed to by file.sim.
  • file.mod: Path to the path to the original input control stream provided as file.mod to NMsim().
  • data.sim: Included for compatibility with NMsim(). Not used.
  • nsims: Number of replications wanted. The default is 1. If greater, multiple control streams will be generated.
  • ext: Parameter values in long format as created by readParsWide and NMdata::NMreadExt.
  • write.ext: If supplied, a path to an rds file where the parameter values used for simulation will be saved.
  • ...: Additional arguments passed to NMsim_default().

Returns

Character vector of simulation control stream paths

  • Maintainer: Philip Delff
  • License: MIT + file LICENSE
  • Last published: 2025-03-13