plot.glmmfields: Plot predictions from an glmmfields model

Description Usage Arguments Examples

Description

Plot predictions from an glmmfields model

Usage

1
2
3
## S3 method for class 'glmmfields'
plot(x, type = c("prediction", "spatial-residual",
  "residual-vs-fitted"), link = TRUE, ...)

Arguments

x

An object returned by glmmfields

type

Type of plot

link

Logical: should the plots be made on the link scale or on the natural scale?

...

Other arguments passed to predict.glmmfields

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Spatiotemporal example:
set.seed(1)
s <- sim_glmmfields(n_draws = 12, n_knots = 12, gp_theta = 1.5,
gp_sigma = 0.2, sd_obs = 0.1)
# options(mc.cores = parallel::detectCores()) # for parallel processing
m <- glmmfields(y ~ 0, time = "time",
 lat = "lat", lon = "lon", data = s$dat,
 nknots = 12, iter = 600, chains = 1)
x <- plot(m, type = "prediction")
x
x + ggplot2::scale_color_gradient2()
plot(m, type = "spatial-residual")
plot(m, type = "residual-vs-fitted")

glmmfields documentation built on May 18, 2019, 9 a.m.