UUPharmacometrics / assemblerr

Quickly assemble pharmacometric models
https://uupharmacometrics.github.io/assemblerr/
Other
10 stars 4 forks source link

pk_absorption_zo - issue with RATE column requirement #17

Open SCarter79 opened 3 years ago

SCarter79 commented 3 years ago

R 4.0.4, assemblerr version SHA1 8781d192. If I develop a model with pk_absorption_zo() then the dataset needs appending with the respective RATE column, otherwise NONMEM will not run.

model11 <- pk_model() +
  pk_elimination_linear() +
  pk_distribution_1cmp() +
  pk_absorption_zo() +
  obs_combined(conc ~ C['central']) +
  dataset(here::here('mx19B.csv'))

render(model11,
       options = assemblerr_options(
         default_record.estimation_step = assemblerr:::nm_estimation(method = "0")),
       filename = here::here('run11.mod'))

gives the following error in NONMEM:

 AN ERROR WAS FOUND IN THE CONTROL STATEMENTS.

AN ERROR WAS FOUND ON LINE 11 AT THE APPROXIMATE POSITION NOTED:
 R1 = AMT/MAT/2
   X
  186  ADDITIONAL PK PARAMS R,D NOT VALID WHEN RATE DATA ITEM ABSENT.
NMtran failed. There is no output for model 1. Contents of FMSG:

 AN ERROR WAS FOUND IN THE CONTROL STATEMENTS.

AN ERROR WAS FOUND ON LINE 11 AT THE APPROXIMATE POSITION NOTED:
 R1 = AMT/MAT/2
   X
  186  ADDITIONAL PK PARAMS R,D NOT VALID WHEN RATE DATA ITEM ABSENT.