Learn R Programming

LOGANTree (version 0.1.1)

ChiSquarePlot: Plot for Chi-square Statistics

Description

Plot for Chi-square Statistics

Usage

ChiSquarePlot(
  trainingdata = NULL,
  nfeatureNames = NULL,
  outcome = NULL,
  level = NULL,
  ModelObject = NULL
)

Arguments

trainingdata

A data set used for training

nfeatureNames

A vector of feature names that will be used for computing chi-square statistics

outcome

A character string with the name of the binary outcome variable.

level

A numerical value indicating the number of categories that the outcome contains

ModelObject

A model object containing tree-based models

Value

This function returns a barplot of scaled chi-square statistics for the study<U+2019>s features. These measures were computed as described by He & von Davier (2015).

References

He, Q., & von Davier, M. (2015). Identifying feature sequences from process data in problem-solving items with N-grams. In Quantitative Psychology Research: The 79th Annual Meeting of the Psychometric Society (pp. 173<U+2013>190). Madison, Wisconsin: Springer International Publishing.

Examples

Run this code
# NOT RUN {
colnames(training)[14] <- "perf"
ensemblist <- TreeModels(traindata = training,
methodlist = c("dt", "gbm"),checkprogress = TRUE)

ChiSquarePlot(trainingdata = training,
nfeatureNames = colnames(training[,7:13]),
outcome = "perf", level = 2, ModelObject = ensemblist$ModelObject)
# }

Run the code above in your browser using DataLab