UUPharmacometrics / xpose

Graphical diagnostics for pharmacometric models
https://uupharmacometrics.github.io/xpose
GNU Lesser General Public License v3.0
55 stars 28 forks source link

VPC in xpose without $SIM #143

Closed palar359 closed 5 years ago

palar359 commented 5 years ago

Hi, I am a beginner in NONMEM (using PsN) and trying to run VPC through it. By now, I know to assign a problem no. for estimation and another for simulation in control stream and run vpc in xpose with the syntax: xpdb %>% vpc_data() %>% vpc(smooth = FALSE, type = 'alpr')

The alternative method is to run estimation and vpc separately in Perl and from the "vpc_dir1" select the "PsN_vpc_plots.R" and generate the vpc plots.

However, if I want to generate VPC from Perl (alternative method) and do vpc plots with xpose how can I do it. I came across the syntax: vpc_data(xpdb, vpc_type = "continuous", psn_folder = NULL, psn_bins = FALSE, obs_problem = NULL, sim_problem = NULL) In this case, I don't have a sim_problem (as there's no problem 2 for simulation in ctrl file) but I do have a psn_folder where my vpc is stored. My question is in this case, what to choose for "psn_folder"?

I chose "vpc_dir1" but encountered with the following message:

VPC continuous --------------------

  1. Gathering data & settings Importing PsN generated data

  2. Computing VPC data Configuring and initializing... Parsing observed data... Filtering rows where MDV not 0 Parsing simulated data... Filtering rows where MDV not 0 Binning: 0.5 3 6 12 24 36 48 72 96 120 Calculating statistics for simulated data... Calculating statistics for observed data...

VPC done run7.lst overview:

Any direction or help is appreciable!!

Thanks, Arindam Pal PhD student, OPG, University of Otago, Dunedin, NZ

palar359 commented 5 years ago

I must add, I tried this option as well:

xpdb %>% vpc_data(psn_folder = '@dir/run7_vpc', psn_bins = TRUE) %>% vpc() But I got this error: The psn_folder:./run7_vpc could not be found.

My run7.lst file was in the same working directory as "vpc_dir1" containing /m1 subfolder.

I am trying to figure out what went wrong?

bguiastr commented 5 years ago

@palar359 if you have a PsN generated vpc folder then you should be using the psn_folder option this is as any file path in R (if you use Rstudio you can get tab completion on your path to ensure that it is correct). The @dir is to facilitate your life if your vpc is in the same directory as the model you imported to create the xpdb. You can have a look at the VPC vignette (here).

Hope it helps !