spreadScore: given a ctree model, compute its spread score

Description Usage Arguments

View source: R/util-tree.R

Description

This function computes the "spread score" for a sample of data, given a ctree explaining a binary variable. New data samples are "predicted" into their ctree nodes and the probability of a 'True' response value for their members is fed into a weighted average of the absolute distance from the sample mean across all dat asamples. The higher the score, the better the model has done at classifying people with divergent behaviors (higher or loewr than average).

Usage

1
spreadScore(df, df.ct, nSample = NULL, responseVar, ignoreCols = c())

Arguments

df

data.frame with response variable to be explained and all explanatory variables to be used in ctree classificaiton

df.ct

ctree already trained on data, that is used to classify the data points in each sub sample.

nSample

number of samples (with replacement) to use for the calculation

responseVar

the name of the variable that the ctree is trying to explain

ignoreCols

an optional list of columns in df, but that should be excluded from the ctree modeling


ConvergenceDA/visdom documentation built on May 6, 2019, 12:51 p.m.