gof | R Documentation |
This is a template function for creating structured goodness of fit diagnostics using the functions in the Xpose specific library.
gof(
runno = NULL,
save = FALSE,
onefile = FALSE,
saveType = "pdf",
pageWidth = 7.6,
pageHeight = 4.9,
structural = TRUE,
residual = TRUE,
covariate = FALSE,
iiv = FALSE,
iov = FALSE,
all = FALSE,
myTrace = xpPage
)
runno |
The run number fo Xpose to identify the appropriate files to
read. In addition |
save |
Logical. |
onefile |
Logical. |
saveType |
The type of graphics file to produce if |
pageWidth |
The width of the graphics device in inches. |
pageHeight |
The height of the graphics device in inches. |
structural |
Logical. |
residual |
Logical. |
covariate |
Logical. |
iiv |
Logical. |
iov |
Logical. |
all |
Logical. |
myTrace |
|
The gof
function is provided as a template to facilitate the
(structured) use of the functions in the Xpose specific library. Xpose
specific is extensively described in the 'Xpose Bestiary'.
The function can be renamed so that multiple scripts can be used in parallel.
The function is set up to make it easy to display plots on screen as well as to save them in files. In the latter case, plots are save in a sub-directory called 'Plots'.
The arguments structural
, residual
, covariate
,
iiv
, iov
and all
are just "switches" to different parts
of the code (if-blocks). These blocks can be removed or the default values
of the arguments changed to better suit the needs of the user.
It is also possible to add tracing information to the produced plots. This
is done via the myTrace
argument. A non-NULL value should be a
function that returns a panel.text
object. The default is the
xpPage
function that will put a string concatenated from the device
name, function name, working directory and date, in small, faint grey, font
at the bottom of each graph page. Note that the user need to add
page=myTrace
as an argument to the Xpose functions for this to have
an effect.
The function calls a support function called gofSetup
, which is
responsible for setting up the graphics device and determining the file
names for saved graphs.
Does not return anything unless the user specify a return value.
E. Niclas Jonsson, Mats Karlsson and Andrew Hooker
xpose4-package
Other generic functions:
xpose.multiple.plot
,
xpose4-package
Other specific functions:
absval.cwres.vs.cov.bw()
,
absval.cwres.vs.pred()
,
absval.cwres.vs.pred.by.cov()
,
absval.iwres.cwres.vs.ipred.pred()
,
absval.iwres.vs.cov.bw()
,
absval.iwres.vs.idv()
,
absval.iwres.vs.ipred()
,
absval.iwres.vs.ipred.by.cov()
,
absval.iwres.vs.pred()
,
absval.wres.vs.cov.bw()
,
absval.wres.vs.idv()
,
absval.wres.vs.pred()
,
absval.wres.vs.pred.by.cov()
,
absval_delta_vs_cov_model_comp
,
addit.gof()
,
autocorr.cwres()
,
autocorr.iwres()
,
autocorr.wres()
,
basic.gof()
,
basic.model.comp()
,
cat.dv.vs.idv.sb()
,
cat.pc()
,
cov.splom()
,
cwres.dist.hist()
,
cwres.dist.qq()
,
cwres.vs.cov()
,
cwres.vs.idv()
,
cwres.vs.idv.bw()
,
cwres.vs.pred()
,
cwres.vs.pred.bw()
,
cwres.wres.vs.idv()
,
cwres.wres.vs.pred()
,
dOFV.vs.cov()
,
dOFV.vs.id()
,
dOFV1.vs.dOFV2()
,
data.checkout()
,
dv.preds.vs.idv()
,
dv.vs.idv()
,
dv.vs.ipred()
,
dv.vs.ipred.by.cov()
,
dv.vs.ipred.by.idv()
,
dv.vs.pred()
,
dv.vs.pred.by.cov()
,
dv.vs.pred.by.idv()
,
dv.vs.pred.ipred()
,
ind.plots()
,
ind.plots.cwres.hist()
,
ind.plots.cwres.qq()
,
ipred.vs.idv()
,
iwres.dist.hist()
,
iwres.dist.qq()
,
iwres.vs.idv()
,
kaplan.plot()
,
par_cov_hist
,
par_cov_qq
,
parm.vs.cov()
,
parm.vs.parm()
,
pred.vs.idv()
,
ranpar.vs.cov()
,
runsum()
,
wres.dist.hist()
,
wres.dist.qq()
,
wres.vs.idv()
,
wres.vs.idv.bw()
,
wres.vs.pred()
,
wres.vs.pred.bw()
,
xpose.VPC()
,
xpose.VPC.both()
,
xpose.VPC.categorical()
,
xpose4-package
## Not run:
## This is an example of how the function may be setup by a user.
library(xpose4)
mygof <- gof
fix(mygof)
myggof <- function (runno = NULL, save = FALSE, onefile = FALSE, saveType = "pdf",
pageWidth = 7.6, pageHeight = 4.9, structural = TRUE, residual = TRUE,
covariate = FALSE, iiv = FALSE, iov = FALSE, all = FALSE, myTrace=xpPage) {
gofSetup(runno, save, onefile, saveType, pageWidth, pageHeight)
xpdb <- xpose.data(runno)
if (structural || all) {
xplot <- dv.vs.pred.ipred(xpdb, page = myPage)
print(xplot)
}
if (residual || all) {
xplot <- absval.wres.vs.pred(xpdb, page = myPage)
print(xplot)
}
if (covariate || all) {
}
if (iiv || all) {
}
if (iov || all) {
}
if (save) dev.off()
invisible()
}
## The function can then be execute, e.g.:
mygof(1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.