nlmixr2 / babelmixr2

The goal of babelmixr2 is to interface nlmixr2 with other pharmacometric tools
https://nlmixr2.github.io/babelmixr2/
8 stars 1 forks source link

poped - evaluate_power error in example 11 #135

Closed TheoPapath closed 1 month ago

TheoPapath commented 1 month ago

evaluate_power gives an error

image

This happens even though parameter number 5 is not fixed - likely a poped error and nothing can be done image

Also in this example, the pediatric FIM does not match 1:1 with the poped examples. Not sure why that is.

mattfidler commented 1 month ago

Hi @TheoPapath

The reason the pediatric FIM does not match is because you mis-translated the model using:

    KA<-tKa*exp(eta.ka)* (pedCL^(isPediatric)) # add covariate for pediatrics

Once you correct to:

    CL<-tCl*exp(eta.cl)* (pedCL^(isPediatric)) # add covariate for pediatrics

The FIM matches. I have updated the example in your branch (you will need to pull the changes).

Also in the babelmixr2 translation the model does not have a parameter 5, so this is the reason this does not exist. If you update this to index 4 it works just fine.

However, this is really not that user-friendly, so I have added the function:

babelBpopIdx(babel.db.all, "pedCL")

Which will query the babel.db.all for the "pedCL" parameter and give the correct index. This is in #136

mattfidler commented 1 month ago

Thank you for working this example, I was unaware of the power of estimating covariates in PopED, this is something I am interested in :smile: