cofaForest: Fits a Random Forest and calculated CoFA statistics for all...

Description Usage Arguments Value

View source: R/cofaForest.R

Description

Fits a Random Forest and calculated CoFA statistics for all pairs of categories.

Usage

1
2
cofaForest(ntree = 100, cvar, yvar, xvars, data, control.cp = 0.001,
  seed = 4, indices = NULL)

Arguments

ntree

integer number of trees to fit within the random forest

cvar

name of the

yvar

name of the column containing a binary outcome variable

xvars

vector of names of columns to use as predictors

data

a data.frame including columns yvar, cvar and xvars

indices

a list of vectors containing the indices of rows to be used when fitting each tree. If NULL, rows will be randomly sampled with replacement.

Value

A list of outputs including a matrix of CoFA statistics (freqMat), a matrix with the total number of times each pair of categories are used for splitting (totalMat), a list of rpart tree objects (tree) and a list of the indices used to fit each tree (indices).


halleewong/cofa documentation built on Nov. 4, 2019, 1:26 p.m.