diffplot: Partially Recursively Induced Structured Moderation

Description Usage Arguments Details Examples

View source: R/diffplot.R

Description

Plot the HPRSIM hierarchical moderation plots for hprism object.

Usage

1
diffplot(l, dat, hvar, dot.size = 1, legend.size = 0.75)

Arguments

l

An rpart output used to plot prism or hprism tree

dat

The same data frame used to generate the prism or hprism object.

hvar

The hierarchical level variable for hprism tree, which is specified within double quotes. If unspecified, prism tree is fitted instead. See Example for detail.

dot.size

A numerical value giving the amount by which plotting should be magnified relative to the default.

legend.size

A numerical value giving the amount by which text should be magnified relative to the default.

Details

More can be learned by a deeper examination of the HPRISM tree topologies. Each branch path to a terminal node for an HPRISM tree explicitly details a discovered hierarchical interaction. This function plots the differences in (log) survival time between levels of the a focus variablefactor x versus values of a contextual social determinant variable w. Each dotted line represents a different terminal node from the HPRISM tree. Conditioning on a particular value of the social determinant variable, we see that if the data points on the line do not coincide, this indicates the first layer of interaction (i.e. the interaction of individual level variables defining the terminal nodes with the focus variable). If the lines are not parallel across different values of w, this is indicative of the hierarchical interaction.

Examples

1
2
3
4
5
## Not run: 
diffplot(l.hprism,dat=Leuk,hvar="tpi",dot.size=0.5)
diffplot(l.hprism1,dat=Leuk,hvar="tpi.m",dot.size=0.5)

## End(Not run)

yuhuilin619/prism documentation built on July 18, 2019, 5:41 p.m.