UUPharmacometrics / PsN

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

Subsetting with vpc #201

Open sandyfloren opened 3 years ago

sandyfloren commented 3 years ago

Is it possible to pass a subsetting condition to xpose4::xpose.VPC() and the other VPC functions within PsN_vpc_plots.R? For example, I have data that has a few very high values for the independent variable (Time After Dose, in this case), and I want to do something like vpc run1.mod -samples=500 -idv=TAD -subset="TAD < 24". Are there any workarounds?

Thanks

rikardn commented 3 years ago

This is not directly supported by PsN.

I think the best way would be to do separate post processing of the vpc data and then create the plot manually. Other options might be to create an indicator column in the data to indicate the subset and to stratify on that or perhaps remove these observations after fitting the model and before running the vpc.