gof(xpose4specific)
gof()所属R语言包:xpose4specific
Structured goodness of fit diagnostics.
结构性善良合适的诊断。
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This is a template function for creating structured goodness of fit diagnostics using the functions in the Xpose specific library.
这是一个模板函数创建结构化的善良特定的库的功能在XPOSE使用合适的诊断。
用法----------Usage----------
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)
参数----------Arguments----------
参数:runno
The run number fo Xpose to identify the appropriate files to read. In addition runno is used to construct the file name to save plots in. runno can also be NULL for cases in which the function is used for non-Xpose based code.
FO XPOSE的运行次数,以确定适当的文件读取。此外runno被用来构造文件名保存图英寸runno也可以是NULL的情况下,该函数用于基于非XPOSE的代码。
参数:save
Logical. TRUE if the plot(s) is to be saved in a file. FALSE if the plot(s) is to be displayed on screen. The plot(s) will be saved in a file named with the function name followed by the word 'run', the run number, an order number followed by a file name extension appropriate for the selected saveType. For example 'gofrun1-01.pdf' for the first plot file created by a script called gof based on output from run 1 and saveType='pdf'.
逻辑。 TRUE如果图(s)是被保存在一个文件中。 FALSE如果是在屏幕上显示的曲线(S)。曲线(S)将被保存在一个名为字“运行”,在运行数与函数名称,订单号,然后通过适当的文件扩展名选定的saveType。例如,gofrun1-01.pdf“的第一个绘图文件创建一个脚本调用gof的基础上从运行1和saveType='pdf'的输出。
参数:onefile
Logical. TRUE if plots are to be save in a single file and FALSE if each plot should be saved as a separate file. In the latter case, each file will be have an incremented order number (01-99).
逻辑。 TRUE如果图被保存在一个单独的文件和FALSE,如果每个小区应保存为一个单独的文件。在后者的情况下,将每个文件有一个递增的顺序号(01-99)。
参数:saveType
The type of graphics file to produce if save=TRUE. Allowed values are 'pdf' (default), 'wmf' (only Windows) and 'png'.
类型的图形文件产生save=TRUE。允许的值是“PDF”(默认值),“WMF”(仅Windows)和“PNG”。
参数:pageWidth
The width of the graphics device in inches.
图形的移动设备以英寸为单位的宽度。
参数:pageHeight
The height of the graphics device in inches.
以英寸为单位的图形的移动设备的高度。
参数:structural
Logical. TRUE if the code in the structural model section (see below) should be executed and FALSE if not.
逻辑。 TRUE中的代码部分(见下文)的结构模型应FALSE如果不执行。
参数:residual
Logical. TRUE if the code in the residual model section (see below) should be executed and FALSE if not.
逻辑。 TRUE如果应执行的代码中残留的模型部分(见下文)和FALSE,如果没有。
参数:covariate
Logical. TRUE if the code in the covariate model section (see below) should be executed and FALSE if not.
逻辑。 TRUE如果协变量模型中的代码部分(见下文),应执行FALSE如果不。
参数:iiv
Logical. TRUE if the code in the IIV model section (see below) should be executed and FALSE if not.
逻辑。 TRUE如果代码中的的IIV模型部分(见下文),应执行FALSE如果不。
参数:iov
Logical. TRUE if the code in the IOV model section (see below) should be executed and FALSE if not.
逻辑。 TRUE,如果该的IOV模型部分(见下面)中的代码应FALSE如果不执行。
参数:all
Logical. TRUE if the code in all sections (see below) should be executed.
逻辑。 TRUE的所有部分(见下文)中的代码被执行。
参数:myTrace
NULL or the name of a function. The value of myTrace can used with the lattice page= argument to annotate plots for tracability.
NULL或函数的名称。 myTrace可以使用的晶格page=参数注释图可追溯性。
Details
详细信息----------Details----------
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 descibed in the 'Xpose Bestiary'.
gof功能是提供一个模板,以方便(结构化)的XPOSE特定库中的函数使用。 XPOSE特定被广泛descibed的在“XPOSE动物寓言集”。
The function can be renamed so that multiple scripts can be used in paralell.
可以重命名的功能,使多个脚本可用于并联。
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.
的参数structural,residual,covariate,iiv,iov和all只是“开关”的不同部分的代码(如果块)。这些块可以被删除或改变的参数的缺省值,以更好地适应用户的需要。
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.
另外,也可以添加跟踪信息,以所产生的图。这是通过myTrace参数。一个非NULL的值应该是一个函数,返回一个panel.text对象。默认的是xpPage函数把一个字符串连接在一起的设备名,函数名,工作目录和日期,小,淡淡的灰色,每一个图形页面底部的字体。需要注意的是,用户需要添加page=myTrace一个的论点到的XPOSE的功能都有影响。
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.
该函数调用gofSetup,这是负责建立图形设备和确定的文件名保存图形支持功能。
值----------Value----------
Does not return anything unless the user specify a return value.
不返回任何东西,除非用户指定一个返回值。
(作者)----------Author(s)----------
E. Niclas Jonsson, Mats Karlsson and Andrew Hooker
参见----------See Also----------
xpose4-package
xpose4-package
实例----------Examples----------
## 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)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|