pip: Calculates posterior inclusion probabilities (PIPs) for...

View source: R/pip.R

pipR Documentation

Calculates posterior inclusion probabilities (PIPs) for modifiers in HDLM & HDLMM

Description

Method for calculating posterior inclusion probabilities (PIPs) for modifiers in HDLM & HDLMM

Usage

pip(object, type = 1)

Arguments

object

An object of class dlmtree.

type

Type=1 indicates single modifier PIPs. Type=2 indicates joint modifier PIPs for two modifiers.

Details

pip

Value

numeric vector of PIPs named with modifiers (type=1) or data.frame of PIPs with the following columns (type=2):

var1

first modifier of joint modifiers

var2

second modifier of joint modifiers

pip

joint PIPs for the two modifiers

Examples


# Posterior inclusion probability with HDLM 
D <- sim.hdlmm(sim = "B", n = 1000)
fit <- dlmtree(y ~ ., 
               data = D$dat,
               exposure.data = D$exposures,
               dlm.type = "linear",
               family = "gaussian",
               het = TRUE)
pip(fit)
pip(fit, type = 2)



dlmtree documentation built on June 8, 2025, 12:39 p.m.