valid.rf: Validation Tree Creation

Description Usage Arguments Value Examples

View source: R/random-forest.R

Description

This function generates a random forest from a set of derived important variables. For example, if a set of important random forest variables were calculated from the ARIC Visit 5 Data, this function then uses the HUNT data to create a tree from those variables. This tree is then returned, evaluating how these variables perform in informativeness in the new dataset.

Usage

1
valid.rf(data, time, outc, valid.terms)

Arguments

data

The tibble containing the Validation dataset

time

The time to event variable for this analysis

outc

The event indicator variable for this analysis

valid.terms

The pre-calculated important terms needed to generate the tree.

Value

tree

This is the Random Forest grown using the supplied terms

vsel

This is the calcuation of relative variable importance, showing how the provided terms replicate in the validation dataset.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 

hunt.data <- haven::read_dta('hunt_data.dta')
time.var <- 'fuptime'
outc.var <- 'hfdiag'

valid.terms <- readRDS('ARIC_random_forest_derived_terms.RDS')

validation.tree <- valid.rf(data = hunt.data, time = time.var,
                            outc = outc.var, valid.terms = valid.terms)


## End(Not run)

pranavdorbala/proteomicsHF documentation built on March 9, 2021, 12:22 a.m.