UUPharmacometrics / PsN

Perl-Speaks-NONMEM
https://uupharmacometrics.github.io/PsN
GNU General Public License v2.0
65 stars 19 forks source link

Fail to obtain the dofv distribution plot #187

Open Calvieream opened 3 years ago

Calvieream commented 3 years ago

I cannot obtain the dofv distribution plot for a model originally running with SAEM (but ofv evaluated with IMP throughout the SIR iterations) and the $PRIOR subroutine (prior information is coded with the new prior naming $THETAP,...). I obtain the following error message in R "Error in zero_range(range) : x must be length 1 or 2" when printing "m2_maxbin". Would someone know how to fix this problem?

rikardn commented 3 years ago

Thanks for reporting this issue. To be able to help I would need a reproducible example. Optionally you could also try to figure out where things go wrong by rerunning the PsN_sir_plots.R.

Calvieream commented 3 years ago

Thanks for your quick reply. Unfortunately, I am not allowed to share my files. However, I found a way to solve my R output problem. Basically, I noticed that PsN outputs the rawresults sheets with an error in my specific case, and I guess this is due to the fact that I use two $EST statements for this model one for SAEM and one for IMP, while the other models generated by PsN only use IMP algorithm. More specifically, the error in the rawresults files is that it is printing "Elapsed | postprocess | time | in | seconds: | 12.27" instead of NAs on the first row, and this makes this row longer than the other, and therefore makes the script crash. So my workaround was to manually erase this erroneous printing and insert a proper number of NAs in place of it. I am still unsure if I should be worried about the "Error in zero_range(range) : x must be length 1 or 2" error message I still obtain when running the R script.

rikardn commented 3 years ago

Would it be possible to post just a snippet of the rawresults? Perhaps only the header would be enough to see the problem.