node_diagnosticKriging: Panel Generating Functions for Partitioned Kriging Models

Description Usage Arguments Format Details Examples

Description

Some panel generating functions of class grapcon_generator (package vcd) for terminal nodes associated with Kriging models. For more details see node_bivplot.

Usage

1
2
3
4
5
6
node_diagnosticKriging(mobobj, id = TRUE, pop = TRUE,
	which = c("loo", "res", "qq"),
	pointcol = "black", pointcex = 0.5, linecol = "black", linetype = 1,
	ylines = 2, margins = rep(1.5, 4),
	kriging.type, trend.reestim = FALSE,
	...)

Arguments

mobobj

[mob]
An object of class mob.

id

[logical(1)]
Should node IDs be plotted?

pop

[logical(1)]
Should the panel viewports be popped?

which

[character]
Which diagnostic plots should be drawn? The default is to draw all three available plots, see details.

pointcol

[numeric | character]
Color for points.

pointcex

[numeric]
Character extension of points in scatter plots.

linecol

[numeric | character]
Color for lines.

linetype

[numeric | character]
Type for lines.

ylines

[numeric(1)]
Number of lines for spaces in y-direction.

margins

[numeric(4)]
Margins of the viewports.

kriging.type

[character(1)]
An optional character string corresponding to the kriging family, to be chosen between simple kriging ("SK") or universal kriging ("UK").

trend.reestim

[logical(1)]
Should the trend be reestimated when removing an observation? Defaults to FALSE.

...

Additional arguments passed to callies.

Format

1
2
3
4
5
function (mobobj, id = TRUE, pop = TRUE, which = c("loo", "res", "qq"), 
    pointcol = "black", pointcex = 0.5, linecol = "black", linetype = 1, 
    ylines = 2, margins = rep(1.5, 4), kriging.type, trend.reestim = FALSE, 
    ...)  
 - attr(*, "class")= chr "grapcon_generator"

Details

node_diagnosticKriging draws diagnostic plots (see also plot.km). There are three different plots available, based on the results of leaveOneOut.km, and which ones are drawn can be controlled via the which argument:

"loo"

plot of fitted values against response values,

"res"

plot of standardized residuals,

"qq"

qqplot of standardized residuals.

The default is to draw all three diagnostic plots.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
if (require(DiceKriging)) {
    d <- 2L
    x <- seq(0, 1, length = 10L)
    design <- expand.grid(x1 = x, x2 = x)
    y <- apply(design, 1, branin)
    df <- data.frame(y = y, design)

    ## no trend (formula = ~ 1)
    m <- mobKriging(y ~ x1 + x2 | x1 + x2, data = df,
        km.args = list(control = list(trace = FALSE)),
        control = mob_control(objfun = deviance, minsplit = 20L, verbose = FALSE))

    ## default
    plot(m, terminal_panel = node_diagnosticKriging(m,
        linecol = "red", linetype = "dashed", kriging.type = "UK"))
    ## only leave-one-out plots
    plot(m, terminal_panel = node_diagnosticKriging(m, which = c("loo"),
        linecol = "red", linetype = "dashed", kriging.type = "UK"))
    ## only qq-plots
    plot(m, terminal_panel = node_diagnosticKriging(m, which = "qq",
        linecol = "grey", linetype = "dashed", kriging.type = "UK"))
    ## leave-one-out and residual plots
    plot(m, terminal_panel = node_diagnosticKriging(m, which = c("loo", "res"),
        linecol = "blue", linetype = "dashed", kriging.type = "UK"))
}

schiffner/mobKriging documentation built on May 29, 2019, 3:39 p.m.