vp.plot: Variance Partitioning plot

Description Usage Arguments Value

View source: R/define_summary.R

Description

The Variance Partitioning (VP) plot is a graphical version of the Variance Partitioning table. It summarizes the contribution of the different sources of variation - main, interaction, spatial and temporal effects, etc - in terms of proportion of explained (generalized) variance. This plot is inspired to Gelman (2005) - Analysis of variance: why it is more important than ever. The Annals of Statistics - where anova results are described by a graph which shows the estimated standard deviation for each bunch of random effects in the model. Our VP plot follows the same idea but represents the contribution of each source in a scale (0, 1)

Usage

1
vp.plot(inla.res, vp.model = "striid", table.type = "mixing", cex.sources = 0.95, title.plot = "", nsim = 10000, ...)

Arguments

inla.res

inla output

vp.model

character indicating the type of VP model; either 'str' or 'striid'; the former is model (1) in the VP paper, the latter is model (2)

table.type

character indicating the type of table, either 'mixing' or 'explained_sd_v1'; mixing is the preferred VP table because it reports the values of the mixing parameters gamma (1-gamma); phi (1-phi); psi1 (1-psi1); psi2 (1-psi2)

cex.sources

size of the labels on the left side with the names of the sources (main, int, space, time, etc...)

title.plot

character, title of the plot

nsim

number of samples drawn from the posterior, to pass on to inla.posterior.sample()

...

Value

It returns a plot summarizing the contribution of the different sources of variation - main, interaction, spatial and temporal effects, etc - in terms of proportion of explained (generalized) variance


massimoventrucci/inlaVP documentation built on Dec. 21, 2021, 2:51 p.m.