image.pep: Heatmap for top models

View source: R/basic_complementary_functions.R

image.pepR Documentation

Heatmap for top models

Description

Generates a heatmap where the rows correspond to the (top) models and the columns to the input/explanatory variables. The value depicted in cell (i,j) corresponds to the posterior inclusion probability of variable i if this is included in model j and zero otherwise.

Usage

## S3 method for class 'pep'
image(x, n.models = 20, ...)

Arguments

x

An object of class pep (e.g., output of pep.lm).

n.models

Positive integer, number of models to be shown on the heatmap. Default value=20.

...

Additional parameters to be passed to heatmap.

Details

The number of models to be displayed on the heatmap is computed as the minimum between the number asked by the user and the number of models present in the object x.

The color code is as follows: the darker the blue in the figure, the higher the posterior inclusion probability is, while white means that the variable is not included in the model.

In the special case of no explanatory variables, no heatmap is produced and a message is printed.

Value

No return value, used for heatmap generation.

See Also

plot.pep

Examples

data(UScrime_data)
set.seed(123)
resu <- pep.lm(y~.,data=UScrime_data,beta.binom=FALSE,
               algorithmic.choice="MC3",itermc3=5000)
image(resu)
image(resu,n.models=10)


PEPBVS documentation built on April 3, 2025, 6:12 p.m.