uupharmacometrics / xpose4 Goto Github PK
View Code? Open in Web Editor NEWModel building aid for population analysis using NONMEM
Home Page: http://uupharmacometrics.github.io/xpose4/
License: GNU Lesser General Public License v3.0
Model building aid for population analysis using NONMEM
Home Page: http://uupharmacometrics.github.io/xpose4/
License: GNU Lesser General Public License v3.0
I am trying to do VPC plot with semilog y axis using xpose.VPC function but the lower bound of pi.ci is below zero. Can you please tell me how to fix this problem? Thanks!
Here is my code:
xpose.VPC(vpc.info=vpc_results.csv, vpctab=vpctab, logy = T)
And I received the following error message:
The PI.ci on the y-axis goes below zero.
This means that taking the log of this prediction
interval gives non-real numbers.
The plot will not be created.
Dear all,
Recently I was making a model of data that had LLOQ and ULOQ data present.
Using the Xpose.vpc.both function I generated VPC plots, however the categorical subplot shows no data when plotting ULOQ data (see example below).
The function works fine when using LLOQ data.
I investigated the code of the function and found that the following part of the code still selects the LLOQ output table when ULOQ is present/selected:
for (LEVS in 1:n.levs) {
ret.new[(1 + (LEVS - 1) * n.idv.levs):(n.idv.levs *
LEVS), 1:5] <- tmp.table.2[, c(idv.index, real.index[[LEVS]],
lower.index[[LEVS]], median.index[[LEVS]], upper.index[[LEVS]])]
ret.new[(1 + (LEVS - 1) * n.idv.levs):(n.idv.levs *
LEVS), "by.var"] <- level.names[LEVS]
}
Therefore it presents the user with an empty table. For now I have created a new function that selects the right table columns to subset from to generate the plots, which does work.
I'm using xpose4_4.7.0 in R version 3.6.2.
Does anyone else have this problem?
Kind regards,
Simon Koele
Radboudumc Pharmacometrics
In read.nm.tables.R, if the files read in have a different number of rows, no data is returned:
The table files associated with this run number ( ) appear
to have different lengths.
Since cotab, catab and patab in many cases just have unique data for the individual (not for each row like sdtab, etc.), it would help if xpose supported loading these files and then expanding based on the individuals (via merge or left_join).
Would it be possible to add another NONMEM run as example data to the package, in addition to the run created via simprazExample?
It would be helpful to have more than just run 1's files when working through examples associated with the model comparison functions
Thank you for your consideration!
Arianna
A quick bug report (maybe?).
He has 2 models he wanted to compare with the individual OFV plot (the shark plot).
The total OFV difference is about 5, but we noticed that from the plots it appears to be almost 20.
After checking a bit, it seems like the problem is due to the fact that each models have 2 estimation records, the first one with MAXEVAL=0. It seems like xpose only uses the values from the first record, hence the different values.
Ciao and thank you!
Paolo Denti
When PsN bootstrap is run with -bca option, the raw_results file will have a number of rows at the end with text jackknife in the first column. When such a raw_results file is used as input to boot.hist, every plots gets an error text all the way across saying
Error using packet 1
(list) object cannot be coerced to type 'double'
Suggestion: Change boot.hist to automatically discard any rows in raw_results that have text jackknife in first column. Regular bootstrap samples have text bootstrap in first column.
I run a simple model (pheno) with the following table:
$TABLE ID MDV TIME DV IPRED PRED RES CWRES NOAPPEND NOPRINT ONEHEADER FILE=sdtab1
Loading into an xpose4 database and doing xpose4::dv.preds.vs.idv(xpdb)
caused xpose4 to crash with the following backtrace:
Error in limits.and.aspect(default.prepanel, prepanel = prepanel, have.xlim = have.xlim, : need at least one panel
7.stop("need at least one panel")
6.limits.and.aspect(default.prepanel, prepanel = prepanel, have.xlim = have.xlim, xlim = xlim, have.ylim = have.ylim, ylim = ylim, x.relation = foo$x.scales$relation, y.relation = foo$y.scales$relation, panel.args.common = foo$panel.args.common, panel.args = foo$panel.args, aspect = aspect, npackets = npackets, ...
5.xyplot.formula(formula(formel), data, obj = object, prepanel = function(x, y) { xlim <- NULL ylim <- NULL ...
4.xyplot(formula(formel), data, obj = object, prepanel = function(x, y) { xlim <- NULL ylim <- NULL ...
3.xpose.plot.default(xvardef("idv", object), c(xvardef("dv", object), xvardef("ipred", object), xvardef("pred", object)), object, scales = scales, ylb = ylb, layout = layout, smooth = smooth, ...)
2.xpose4::dv.preds.vs.idv(xpdb)
1.print(xpose4::dv.preds.vs.idv(xpdb))
Adding the column WRES
to the $TABLE stops it from crashing.
Running Xpose-4.5.3 under Windows 8, R-3.2.2.
In xpose.data there is the following code to pick up xpose.ini:
`xpobj <- new("xpose.data", Runno = 1, Doc = NULL, Data = NULL)
if (is.readable.file("xpose.ini")) {
xpobj <- xpose.read(xpobj, file = "xpose.ini")
}
else {
rhome <- R.home()
xdefini <- paste(rhome, "\library\xpose4\xpose.ini",
sep = "")
if (is.readable.file(xdefini)) {
xpobj <- xpose.read(xpobj, file = xdefini)
}
else {
xdefini2 <- paste(rhome, "\library\xpose4\xpose.ini",
sep = "")
if (is.readable.file(xdefini2)) {
xpobj <- xpose.read(xpobj, file = xdefini2)
}
}
}`
I suspect the definition of xdefini
should actually point to .libPaths()[1]
rather thanR.home()
. In Windows, if R libraries are installed in the user directory ("Documents"), then .libPaths()
would point to this location as the first entry. R.home()
will point to the installation directory of R. It depends where users have their libraries... At present I think the code points to the same location for xdefini
and xdefini2
... I think this is a mistake. Perhaps using .libPaths()[1]
and .libPaths()[2]
would be more robust?
Also, I'd suggest that you probably want to look at the user level before proceeding to the installation default.
Regards,
Mike
Hi,
I'm trying to make a so called shark plot (dOFV.vs.ID), but unfortunately get the following error message:
Error in 1:max.rank : result would be too long a vector
In addition: Warning message:
In max(comp.frame$rnk) : no non-missing arguments to max; returning -Inf
I'm still pretty new to R and NONMEM, but my experienced colleagues run into the same issue.
Is this a bug, or do we need to do something differently?
Thank you very much in advance,
Rebecca Hermans
PhD student Erasmus MC Rotterdam
Hi,
I am using Xpose4 function for Etas_vs_Covariates to generate the the plot. Most of the ETA plots look fine, but for one of them I get the plot below. The error message seems to indicate I have non numeric value in the data for ETA 5 . But other ETA plots vs DOSA look fine. I thought may be this is due to the variability/sparsity of the data to allow fitting smooth line, so tried to turn off the argument as follows:
ranpar.vs.cov(xpdb, smooth = FALSE)
But, the error still appears and also all other ETA plots still have the smooth line.
What is the cause of this error?
Why smooth cannot be turned off with the argument above?
Is there a workaround for this?
Thanks for any comments.
Pradeep
I run a simple model (pheno) with the following (admittedly minimal) table:
$TABLE ID NOAPPEND NOPRINT ONEHEADER FILE=sdtab1
When trying to read the results into an xpdb with xpose.data
it crashes with the following trace:
Error in (function (cl, name, valueClass) : assignment of an object of class “numeric” is not valid for @‘Data’ in an object of class “xpose.data”; is(value, "data.frame_or_NULL") is not TRUE
4.stop(gettextf("assignment of an object of class %s is not valid for @%s in an object of class %s; is(value, \"%s\") is not TRUE", dQuote(valueClass), sQuote(name), dQuote(cl), slotClass), domain = NA)
3.(function (cl, name, valueClass) { ClassDef <- getClass(cl) slotClass <- ClassDef@slots[[name]] ...
2.`Data<-`(`*tmp*`, value = tmp)
1.xpose4::xpose.data(xpose.runno, directory = results.directory, tab.suffix = tab.suffix, mod.prefix = mod.prefix, mod.suffix = mod.suffix)
Adding the column TIME
to the sdtab1 stops xpose from crashing.
Hello all,
There seems to be an issue with the new xpose version when reading NONMEM generated table files, it fails to read the entire data items from tab files, e.g in patab.csv file (where I output my model parameters) I have around 10 data items but it only reads a subset of them. however, when I try to read the files with read.nm.tables, I can see that all of the data items are read.
I'm attaching a subset of the output files for reproducibility
example.zip
Thanks
Mahmoud
Hello, it's a new NONMEMer named Joanna.
When I trying to create a plot of ETA vs Covatiates with xpose4.ranpar.vs.cov, I found the covariates with value of -99 was not shown in the plot , which were remain in the dataset(object) with xpose4.xpose.data. So, I wonder if -99 was just handled as missing when ploting in this function? And if the -99 was handled as missing, will the records with -99 will be discarded or only -99 be recognized as NA?
(xpose4 version is 4.6.1)
Looking forward Your comment.
Hi
In performing the diagnostic plot - i found the observation shown in the figure output is not same as the table obsevation.
in the image below the observation shows to be in > 100 however in the table (output form xpdb) shows arounf 38.3 (max) for ID 3009.
Please advise if im missing something
Jesmin
Hi!
Are the examples (data, NM ctl, outputs) listed under ?xpose.VPC.categorical (PsN-generated "/binary/vpc_36", "/ordered_cat/vpc_45" or "/count/vpc65b") generally available? Were they available with older PsN (or xpose4) releaseases?
Thanks!
Bojan
I am trying to set different ylim
for the 2 panels in my xpose.VPC
plot. Reading through the documentation of xyplot
in lattice, I was thinking something like
scales = list(y = list(relation = "free")),
ylim = list(c(0,600),c(0,300)),
should work, but the limits for both the panels are set to (0,600)
. I also get the following warning
Warning messages:
1: In limitlist[id] <- lim :
number of items to replace is not a multiple of replacement length
2: In limitlist[id] <- lim :
number of items to replace is not a multiple of replacement length
Any help in how to set different ylim
for different panels would be very much appreciated!
A similar setting in xyplot
from lattice
seems to be working and gives me different y-limits, e.g., the following works
library(lattice)
temp.cut <- equal.count(environmental$temperature, 2)
xyplot(ozone ~ radiation | temp.cut, data = environmental,
scales = list(y = list(relation = "free",
limits = list(c(0,150),c(0,100)))))
Thank you!
SN
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.