Dear colleagues,
In the recent version (0.1.3) of NMsim Brian Reilly and I have worked to
automate simulation with parameter variability based on the uncertainty
estimate provided by the $COVARIANCE step. We are using the NWPRI
subroutine after calculating degrees of freedom taking into account
BLOCK structures in $OMEGA and $SIGMA.
The problem:
The routine seems to execute smoothly, but the distributions of the
OMEGA parameters do not come out as expected. High level, we are seeing
that only the first BLOCK of OMEGAS come out reasonable - the rest are
off. Some simulated distributions do not capture the estimated $OMEGA
value.
I have created an issue on github with debugging info:
https://github.com/philipdelff/NMsim/issues/20
Any help is appreciated. Answer here, on the github issue, or directly
to me.
Background information:
NMsim aims at providing an R interface to seamlessly interact with
Nonmem to generate simulations of a wide range of Nonmem models, without
any reimplementation or translation of the model necessary. It
conveniently returns results as a data.frame so the user doesn't have to
manually look into files generated by Nonmem. NMsim generates control
streams and handles data but entirely relies on Nonmem to simulate
models. Hence, the question I am asking is entirely related to Nonmem
and the NWPRI subroutine.
So far, the method is still experimental but for many models it works
nicely for the $THETA parameters, and can be run this easily:
simres <- NMsim(file.mod="path/to/control/stream.mod",
data=data.sim,
method.sim=NMsim_NWPRI,
subproblems=100)
NMsim will then generate a new control stream based on stream.mod,
updated with parameters from stream.ext including additional needed
sections like $THETAP, $THETAPV, $OMEGAP, $OMEGAPD etc. The parameters
that go into these sections are taken from and derived from the .ext
file (degrees of freedom calculated). In this case 100 distinct
parameter sets will be simulated. We hope this will be helpful to the
community.
Thank you!
Philip