end_nodes: end_nodes

Description Usage Arguments Value Examples

View source: R/sfun_rpm_20_04_04.R

Description

Either a vector of end-node labels for each opbservation in newdata or a vector of the endnodes in the tree model if newdata is not provided.

Usage

1
end_nodes(object, newdata = NULL)

Arguments

object

rpms object

newdata

data.frame

Value

vector of end_node labels

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
# 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) 
 
 end_nodes(r1)
}

rpms documentation built on June 26, 2021, 1:07 a.m.