compute.cwres(run.number,
tab.prefix="cwtab",
sim.suffix="",
est.tab.suffix=".est",
deriv.tab.suffix=".deriv",
old.file.convention=FALSE,
id="ALL",
printToOutfile=TRUE,
onlyNonZero=TRUE,
...)xpose.calculate.cwres(object,
cwres.table.prefix = "cwtab",
tab.suffix = "",
sim.suffix = "sim",
est.tab.suffix=".est",
deriv.tab.suffix=".deriv",
old.file.convention=FALSE,
id = "ALL",
printToOutfile = TRUE,
onlyNonZero = FALSE,
classic = FALSE,
...)
cwtab1sim.est
and cwtab1sim.deriv
datasetname
. Value is fixed to "ALL" for xpose.calculate.cwres
.datasetname
. Only works if id
="ALL". If chosen the
resulting output file will be datasetname
.cwrescompute.cwres
should include the zero
values associated with non-measurement lines in a NONMEM data file. This procedure can be done automatically using Perl Speaks NONMEM
(PsN) and we highly recommend using PsN for this purpose. After
installing PsN just type 'execute [modelname] -compute_cwres
'.
See
Insert this line directly after your $DATA line.
The value of X is the number of ETA() terms plus the number of EPS()
terms in your model. For example for a model with three ETA() terms
and two EPS() terms the code would look like this:
$DATA temp.csv IGNORE=@
$ABB COMRES=5
$INPUT ID TIME DV MDV AMT EVID
$SUB ADVAN2 TRANS2 }
If you are using $PRED, the verbatim code should be inserted directly after the $PRED section of your model file. For each ETA(y) in your model there is a corresponding term G(y,1) that you must assign to a COM() variable. For each EPS(y) in your model, there is a corresponding H(y,1) term that you must assign to a COM() variable. The code would look like this for three ETA() terms and two EPS() terms: "LAST " COM(1)=G(1,1) " COM(2)=G(2,1) " COM(3)=G(3,1) " COM(4)=H(1,1) " COM(5)=H(2,1) } }
POSTHOC
## Capture CWRES from cwtab5.est and cwtab5.deriv
cwres <- compute.cwres(5)
mean(cwres)
var(cwres)
## Capture CWRES from cwtab1.est and cwtab1.deriv, do not print out, allow zeroes
cwres <- compute.cwres("1", printToOutFile = FALSE,
onlyNonZero = FALSE)
## Capture CWRES for ID==1
cwres.1 <- compute.cwres("1", id=1)
## xpdb5 is an Xpose data object
## We expect to find the required NONMEM run and table files for run
## 5 in the current working directory
xpdb5 <- xpose.data(5)
## Compare WRES, CWRES
xpdb5 <- xpose.calculate.cwres(xpdb5)
cwres.wres.vs.idv(xpdb5)
Run the code above in your browser using DataLab