philipdelff / NMsim

Simulate Nonmem models from R
https://philipdelff.github.io/NMsim/
Other
5 stars 2 forks source link

Simulate "known" subjects with variability #5

Open philipdelff opened 10 months ago

philipdelff commented 10 months ago

How can we pull in ETAs and also evaluate ERR() and/or EPS() in $ERROR?

Here is what NMsim_known (the function or "method" NMsim provides to simulate subjects with known ETAs) does and why. It pulls in ETAs from the phi file using an $ETAS statement like this:

$ETAS FILE=NMsim_xgxr021_known1_input.phi  FORMAT=s1pE15.8 TBLN=1

As far as I understand that has to be accompanied by a $ESTIMATION step that specifies FNLETA=2 like this:

$ESTIMATION  MAXEVAL=0 NOABORT METHOD=1 INTERACTION FNLETA=2

I have not been able to get $SIM ONLYSIM to work with this so instead it just does:

$SIMULATION  (220412)

This however means that in the following from $ERROR we don't get the ERR(1) and ERR(2) simulated and so Y=IPRED.

Y=F+F*ERR(1)+ERR(2)

Meaning currently, NMsim_known does not provide simulation with residual variability.