coefINLA: Create ggplot for INLA fixed effects coefficients

Description Usage Arguments Author(s) See Also Examples

View source: R/coefINLA.R

Description

This function takes model objects from INLA and produces a ggplot for the posterior fixed effects coefficients.

Usage

1
2
coefINLA(mod.inla, palette="Purples", exp=FALSE, labeller=NULL, 
		 intercept=TRUE, exclude=FALSE)

Arguments

mod.inla

a model object produced from INLA

palette

a named palette from RColorBrewer, e.g. "Purples", "Blues", "Greens". Defaults to "Purples"

exp

exponentiate coefficients? Defaults to FALSE

labeller

specify a pre-specified labeller to change the facet labels. Defaults to NULL, using variable column names as facet labels.

intercept

should the model intercept be included in the graphic? TRUE by default.

exclude

a character element or vector indicating column names of covariates to exclude from graphic.

Author(s)

Chris Hess, University of Washington

See Also

https://www.github.com/hesscl/coefINLA

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(iris)

mod1 <- Sepal.Length ~ Sepal.Width + Petal.Length + Petal.Width
fit1 <- inla(mod1,
             data = iris,
             "normal")

coefINLA(fit1) +
  labs(title = "Posterior Distributions",
       subtitle = "with 95% interval") +
  ggsave(filename = "./example.pdf", dpi = 300,
         width = 6, height = 8)

hesscl/coefINLA documentation built on May 25, 2019, 5:26 p.m.