Learn R Programming

rpms (version 0.2.0)

node_plot: node_plot

Description

plots end-node of object of class rpms

Usage

node_plot(t1, node, data, variable = NA, ...)

Arguments

t1

rpms object

node

integer label of the desired end-node.

data

data.frame that includes variables used in rp_equ, e_equ, and design information

variable

string name of variable in data to use as x-axis in plot

...

further arguments passed to plot function.

Examples

Run this code
{

# model linear fit between retirement contributions and amount of income 
r1 <-rpms(FINDRETX~EDUC_REF+AGE_REF+BLS_URBN+REGION, data=CE,
     e_equ=FINDRETX~FINCBTAX, clusters=~CID) 

# plot node 2 if it is in tree
if(2 %in% end_nodes(r1))
  node_plot(r1, node=2, data=CE)

#' # plot last end-node

if(6 %in% end_nodes(r1))
  node_plot(r1, node=6, data=CE)


}

Run the code above in your browser using DataLab