| qtree | R Documentation |
Code to write a latex qtree plot takes a rpm frame and returns latex code to produce qtree uses linearize as a guide Produces text code to produce tree structure in tex document Requires using LaTex packages and the following commands in preamble of LaTex doc: \usepackage{lscape} and \usepackage{tikz-qtree}
qtree( t1, title = NULL, label = NA, caption = "", digits = 2, s_size = TRUE, scale = 1, lscape = FALSE, subnode = 1 )
t1 |
rpms object created by rpms function |
title |
string for the top node of the tree |
label |
string used for labeling the tree figure |
caption |
string used for caption |
digits |
integer number of displayed digits |
s_size |
boolean indicating whether or not to include sample size |
scale |
numeric factor for scaling size of tree |
lscape |
boolean to display tree in landscape mode |
subnode |
starting node of subtree to plot |
{
# model mean of retirement account value for households with reported
# retirment account values > 0 using a binary tree while accounting for
# clusterd data and sample weights.
s1<- which(CE$IRAX > 0)
r1 <-rpms(IRAX~EDUCA+AGE+BLS_URBN, data = CE[s1,], weights=~FINLWT21, clusters=~CID)
# get Latex code
qtree(r1)
}