hypoRF: HypoRF; a Random Forest based Two Sample Test

Description Usage Arguments Value See Also Examples

View source: R/hypoRF.R

Description

Performs a permutation two sample test based on the out-of-bag-error of random forest

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
hypoRF(
  data1,
  data2,
  K = 100,
  statistic = "PerClassOOB",
  normalapprox = F,
  seed = NULL,
  alpha = 0.05,
  ...
)

Arguments

data1

An object of type "data.frame". The first sample.

data2

An object of type "data.frame". The second sample.

K

A numeric value specifying the number of times the created label is permuted. For K = 1 a binomial test is carried out. The Default is K = 100.

statistic

A character value specifying the statistic for permutation testing. Two options available

  • PerClassOOB Sum of OOB per class errors.

  • OverallOOB OOB-error.

. Default is statistic = "PerClassOOB".

normalapprox

A logical value asking for the use of a normal approximation. Default is normalapprox = FALSE.

seed

A numeric value for reproducibility.

alpha

The level of the test. Default is alpha = 0.05.

...

Arguments to be passed to ranger

Value

A list with elements

See Also

ranger

Examples

1
2
3
4
5
6
# Using the default testing procedure (permutation test)
x1 <- data.frame(x=stats::rt(100, df=1.5))
x2 <- data.frame(x=stats::rnorm(100))
hypoRF(x1, x2, K=2)
# Using the exact binomial test
hypoRF(x1, x2, K=1)

hypoRF documentation built on May 7, 2021, 5:07 p.m.

Related to hypoRF in hypoRF...