Bug with covariates and simobs

Hello, I seem to have found a bug with simobs.

I’m sending the following into read_pumas and then running simobs:

It appears that the output from simobs is back-propagating the covariates between dosing events, instead of forward-propagating:

Hi Donald,

Can you check if you get your desired result by using the covariates_direction keyword argument inread_pumas as mentioned here Dosage Regimens, Subjects, and Populations · Pumas

Thank you! I didn’t know about that keyword. Doing covariates_direction = :left fixed the issue. Is that correct? It seems like the opposite of what’s intended.

The behavior is intended but maybe not what you expected. There are several ways to interpolate between two observations. Our default is the same as NONMEM’s and it’s sometimes called next observation carried backwards (NOCB). I believe the Phoenix NLME uses the interpolation scheme that you expected which is sometimes called last observation carried forward (LOCF) and that Nlmixr’s default is linear interpolation.

1 Like