rpms_boost: rpms_boost

Description Usage Arguments Value Examples

View source: R/extend_21_03_03.R

Description

function for producing boosted rpms models (trees or random forests)

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
rpms_boost(
  rp_equ,
  data,
  weights = ~1,
  strata = ~1,
  clusters = ~1,
  e_equ = ~1,
  bin_size = NULL,
  gridpts = 3,
  perm_reps = 100L,
  pval = 0.05,
  f_size = 200L,
  model_type = "tree",
  times = 2L
)

Arguments

rp_equ

formula containing all variables for partitioning

data

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

weights

formula or vector of sample weights for each observation

strata

formula or vector of strata labels

clusters

formula or vector of cluster labels

e_equ

formula for modeling data in each node

bin_size

numeric minimum number of observations in each node

gridpts

integer number of middle points to do in search

perm_reps

integer specifying the number of thousands of permuation replications to use to estimate p-value

pval

numeric p-value used to reject null hypothesis in permutation test

f_size

integer specifying the number of trees in the forest (only used if model_type is "forest")

model_type

string: one of "tree" or "forest"

times

integer specifying number of boosting levels to try.

Value

object of class "rpms_boost"

Examples

1
2
3
4
5
6
7
8
{
# model mean of retirement contributions with a binary tree while accounting 
# for clusterd data and sample weights.

rpms_boost(IRAX~EDUCA+AGE+BLS_URBN, data = CE,  weights=~FINLWT21, clusters=~CID, pval=.01)


}

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