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

Stratification on 2 variables within vpc_data #106

Closed htjollyn closed 5 years ago

htjollyn commented 6 years ago

Dear Xpose group

I would like to use vpc_data from the xpose package to be able to stratify on 2 variables. I have 2 columns in the original file as well as in the sdtab, named CMT (the NONMEM compartment) and GRP (the dose group).

With the following code I want to stratify first on GRP, then on CMT:

vpc_data(xpdb, vpc_type = "continuous", stratify = ~GRP+CMT, psn_folder = dir")

I get the following output after running the command:

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

  1. Gathering data & settings Importing PsN generated data |============================| 100% 86 MB Setting stratifying variable to GRP, CMT

  2. Computing VPC data Configuring and initializing... Stratifying oberved data... Error in check_stratification_columns_available(obs, stratify, "observation") : The following specified stratification columns were NOT found in observation data: GRP,CMT

Did anybody encounter a similar issue? How can it be resolved?

Thank you in advance!

Best Huybrecht

bguiastr commented 6 years ago

Dear Huybrecht,

In xpose you can either generate VPCs using a PsN folder (via the psn_folder argument) or by using a run containing both a simulation and an estimation problem.

From your message it seems that you opted for the latter and I am suspecting that your problem may be due to the fact that your NONMEM run only contained one $PROBLEM. I will try to improve this in the future but in the meantime you can see code here

You can read more about vpcs in xpose here.

Best of luck

bguiastr commented 5 years ago

I am closing this please re-open if needed

htjollyn commented 5 years ago

Ok thank you, Huybrecht

On Sun, 13 Jan 2019, 22:27 Benjamin <notifications@github.com wrote:

I am closing this please re-open if needed

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/UUPharmacometrics/xpose/issues/106#issuecomment-453867091, or mute the thread https://github.com/notifications/unsubscribe-auth/AfMhT4BOOi3iG-5OWfij0gkl0zhj_pPUks5vC6S2gaJpZM4V7bYm .

faisalhhu commented 2 years ago

Hi I have a similar question I have dataset with CMT column for compartment. I want to startify based on pediatric age groups. So in the data I coded the age groups as 1,2,3 and gave column name GRP. Now when I run VPC Command using -stratify_on=c(CMT,GRP) or stratify_on=‘CMT’~’GRP’ It gives error with termination.

can you kindly help on what I am missing

thanks Faisal