Learn R Programming

GaSP (version 1.0.6)

PlotAll: Execute PlotPredictions, PlotResiduals, PlotStdResiduals, PlotMainEffects, and PlotJointEffects.

Description

Execute PlotPredictions, PlotResiduals and PlotStdResiduals (all applied to cross validation only), PlotMainEffects, and PlotJointEffects.

Usage

PlotAll(
  GaSP_model,
  cross_validation,
  visualization,
  y_name = "y",
  y_units = "",
  x_units = NULL,
  se_plot = TRUE,
  y_values = NULL,
  se_values = NULL,
  pch = 1
)

Value

No return value, generates plots.

Arguments

GaSP_model

Object of class GaSPModel, the entire model will be verified but only x and y will be used.

cross_validation

A data frame returned by CrossValidate.

visualization

A list object returned by Visualize.

y_name

An optional character string containing the output variable name (for labels).

y_units

An optional character string containing the units of the output variable (for labels).

x_units

An optional vector of character strings containing the units of the input variables (for labels).

se_plot

An optional boolean indicating whether to make standard-error contour plots.

y_values

An optional vector of contour values for the estimated joint effects.

se_values

An optional vector of contour values for the standard errors.

pch

Plotting symbol for plot; default is open circle.

Examples

Run this code
# \dontshow{
x <- borehole$x
y <- borehole$y
theta <- c(
  5.767699e+01, 0.000000e+00, 0.000000e+00, 1.433571e-06,
  0.000000e+00, 2.366557e-06, 1.695619e-07, 2.454376e-09
)
alpha <- c(
  1.110223e-16, 0.000000e+00, 0.000000e+00, 0.000000e+00,
  0.000000e+00, 0.000000e+00, 2.494862e-03, 0.000000e+00
)
cor_par <- data.frame(Theta = theta, Alpha = alpha)
rownames(cor_par) <- colnames(borehole$x)
sp_var <- 38783.7
borehole_fit <- GaSPModel(
  x = borehole$x, y = borehole$y,
  reg_model = ~1, cor_family = "PowerExponential",
  cor_par = cor_par, random_error = FALSE,
  sp_var = sp_var
)
borehole_x_names <- colnames(x)
borehole_min <- c(0.05, 100.00, 63070.00, 990.00, 63.10, 700.00, 1120.00, 9855.00)
borehole_max <- c(0.15, 50000.00, 115600.00, 1110.00, 116.00, 820.00, 1680.00, 12045.00)
borehole_x_desc <- DescribeX(borehole_x_names, borehole_min, borehole_max)
borehole_vis <- Visualize(borehole_fit, borehole_x_desc)
borehole_cv <- CrossValidate(borehole_fit)
# }
PlotAll(borehole_fit, borehole_cv, borehole_vis)

Run the code above in your browser using DataLab