View source: R/autoplot_inla.R
plot_random_effects | R Documentation |
Replicate the individual plots produced by plot
using ggplot.
plot_random_effects(x, type = "line") plot_fixed_marginals(x, priors = FALSE, CI = FALSE) plot_hyper_marginals(x, CI = FALSE) plot_marginals_fitted(x)
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] |
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.