ggPMXdevelopment / ggPMX

ggPMX R package
37 stars 12 forks source link

sim_blq read in correctly for Monolix 2019R2, 2020R1 and 2022R2 but not used in any of the plots #255

Open biencan1 opened 2 years ago

biencan1 commented 2 years ago

In Monolix 2019R2, 2020R1 and 2022R2 there are no issues with reading in sim_blq data, but they are not used in plotting to substitute DV values for censored data.

Example code run after creating controller:

ctr %>% pmx_plot_iwres_ipred (bloq=pmx_bloq(cens="BLOQ",colour="blue",size=1),
                              strat.facet = ~TRT,
                              use.abbrev = TRUE,
                              is.draft=FALSE,
                              facets=list(scales="free_x",nrow=1),
                              labels = list(title = "IWRES vs IPRED by dose"))

Produces following plot: image

While the plot should look more like this: image

When checking the controller the simulated values seem to be loaded fine but under “bloq”: type NULL and value reads “Pairlist of length 0” (see snapshot below). Is that correct? image

ggPMX 1.2.8 was used using following R-module: R 4.1.0 Base.

Monolix run outputs and R scripts available to recreate the issue

tynsci commented 2 years ago
tynsci commented 2 years ago

@biencan1

Data substition for simulated BLOQ

Resulting Plot

iwres_sim_blq

Next

tynsci commented 2 years ago

@biencan1

Assumptions

Challenges

biencan1 commented 2 years ago

I suggest to use the mode_simBlq only (without giving the choice between the mean and the mode). However, it should be made clear in the documentation that the mode_simBlq is used.

baltcir1 commented 1 year ago

sim_blq still doesn't work.

mattfidler commented 1 year ago

Not fixed by #365

mattfidler commented 1 year ago

First issue with BLQ

This is hard coded in the yaml file:

https://github.com/ggPMXdevelopment/ggPMX/blob/ee9a72d754e13d5d3f5145a6daf41409da4089ae/inst/templates/mlx18/standing.ipmx#L10

It shouldn't be. It is based on endpoint, and should match what you are pulling in for the endpoint. The default should be y which is the typical endpoint for monolix single endpoint models (though in truth this can be arbitrary and is for models coming from other sources like babelmixr2 or edited manually).

Second issue with BLQ

Currently the DVs are not replaced with the simulated values; Currently it actually replaces the DV with nothing. The default DV is still the LLOQ value which was in the input dataset, and doesn't match the simulated BLQ dataset from the monolix files.

mattfidler commented 1 year ago

@tynesjo if you need to have some screen sharing we can show you what the issue is and which columns you need to grab.