I created a test example to look at this and indeed the plot does not appear to pick up all of the covariates in the dataset.
This plot as you know relies on the Xpose4 package. There are 2 key functions within that package that are used, xpose.data() which creates an "xpose data object" that is formatted to work with xpose functions, and ranpar.vs.cov() which is the function that generates the plot.
From the Xpose4 help files (e.g., https://rdrr.io/cran...ar.vs.cov.html)we see that ranpar.vs.cov() does the following:
"Each of the random parameters (ETAs) in the Xpose data object, as specified in object@Prefs@Xvardef$ranpar, is plotted against each covariate present, as specified in object@Prefs@Xvardef$covariates, creating a stack of plots."
The problem I found in my mocked up example, is that the xpose data object created, object@Prefs@Xvardef$covariates does not have the full list of covariates in my model. This appears to be an issue with the xpose.data() function.
The workaround: In pirana, you can do the following:
- Right click on the Etas_vs_Covariates.R script and select "open script in RStudio".
- At about line 46 you will see the call to xpose.data(): xpdb<-xpose.data(new.runno)
- Insert a line below this and insert the following command:
- xpdb@Prefs@Xvardef$covariates<-c("CLCR","WT","AGE","RACE","SEX","FOOD"), where the covariates listed are all of the covariates in your model
- Run the full script in RStudio, and this should produce all of your outputs
I hope this is helpful, and please let me know if you need additional help. For example, if you send me your NONMEM control file and a snippet of the dataset (e.g., 2 subjects), I can test and send you the modified code.
Edited by kniefort, 06 November 2020 - 05:36 PM.