plot_random_effects: Individual plot functions for INLA objects

Description Usage Arguments Examples

View source: R/autoplot_inla.R

Description

Replicate the individual plots produced by plot using ggplot.

Usage

1
2
3
4
5
6
7

Arguments

x

An inla object

type

Which type of plot? 'boxplot' or 'line'

priors

Logical, plot priors as well.

CI

Plot credible intervals. TRUE for 95% CI or a numeric in [0, 1]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
 library(INLA)
 data(Epil)
 ##Define the model
 formula = y ~ Trt + Age + V4 +
          f(Ind, model="iid") + f(rand,model="iid")
 result = inla(formula, family="poisson", data = Epil, control.predictor = list(compute = TRUE))

 plot_random_effects(result)
 plot_random_effects(result, type = 'boxplot')
 plot_fixed_marginals(result)
 plot_hyper_marginals(result)

## End(Not run)

INLAutils documentation built on Dec. 6, 2017, 5:06 p.m.