rie.d: Relative Information Error using data sets as input

View source: R/RIE.R

rie.dR Documentation

Relative Information Error using data sets as input

Description

Calculate the information error and relative information error using the data as the input. The data will be transformed to discretized data, from where the probability is calculated.

Usage

rie.d(
  X,
  rvars,
  svars,
  contivars = NULL,
  method = "emp",
  disc = "equalfreq",
  nbins = nrow(X)^(1/3)
)

Arguments

X

matrix or data.frame containing all variables

rvars

relevant variables

svars

selected variables

contivars

which variables are continuous? By default, only continuous variables will be discretized. If NULL, all variables are continuous.

method

the name of the entropy estimator. We use the entropy computation of the infotheo package, where four methods are includes: "emp", "mm", "shrink", "sg". For more details, see entropy() in "infotheo" package.

disc

the strategies to discretize data. Three options are provided: "equalfreq", "equalwidth", and "globalequalwidth". See discretize() in "infotheo" package.

nbins

iteger specifying the number of bins to be used for the discretization

Author(s)

Shuo Wang

Examples


m <- GenMatrix(3, rlist = list(c(1, 2, 0.5), c(1, 3, 0.3), c(2, 3, 0.7)))
D <- GenData(100, rmatrix = m)
rvars = c("x1", "x2")
svars = c("x2", "x3")
rie.d(D, rvars, svars)


ShuoStat/RIE documentation built on March 19, 2022, 3:30 a.m.