ggPMXdevelopment / ggPMX

ggPMX R package
37 stars 12 forks source link

Controller creation does not work when multiple end points in the model (ggPMX 1.2.8) #264

Closed biencan1 closed 2 years ago

biencan1 commented 2 years ago

Controller creation does not work when multiple end points in the model (ggPMX 1.2.8). I fitted a PKPD model with two end points: 1st PK concentrations (left censored, i.e., with blq-s), and, 2nd response variable. The dependent variable name in the dataset is LIDV, DVID is used to distinguish the end points.

I was unable to generate the controller for either of the end points. Please see below the snap shot of code execution in R:

image

I suspect the underlying issue might be that in all datasets in Charts Data LIDV is renamed to y1 for the first end point and y2 for the 2nd end point.

baltcir1 commented 2 years ago

Can you please use the argument call = TRUE in pmx_mlxtran and check how the various arguments were assigned?

Then please use pmx_mlx() to create the controller. I think you also need to match the vpc simulation outputs.

Happy to help you debug that issue later this week.

biencan1 commented 2 years ago

I found the source of the error.

When fitting 2 end points Monolix renames them to y1 and y2 independently of how the dependent variable is named in the dataset.

Because of this when running simulations for vpc the dependent variables are named y1 or y2 rather than same as in the original dataset (in this case LIDV).

Renaming the simulated endpoint name in the simulation file to LIDV solved the issue.

baltcir1 commented 2 years ago

There you go! I had that in mind.. cause experienced the same issue as you before. We should put this in the doc!