htt_control: Control for Hypothesis Testing Tree

View source: R/htt_control.R

htt_controlR Documentation

Control for Hypothesis Testing Tree

Description

Various parameters that control aspects of the HTT function.

Usage

htt_control(teststat = c("energy0", "energy1"),
             testtype = c("permutation", "fastpermutation"),
             alpha = 1, pt = 0.05, minsplit = 30,
             minbucket = round(minsplit/3),
             R = 199, nmin = 1000)

Arguments

teststat

a character specifying the type of the test statistic to be applied. It can be teststat = "energy0" or teststat = "energy1". Default is teststat = "energy0".

testtype

a character specifying how to compute the distribution of the test statistic. It can be testtype = "permutation" or testtype = "fastpermutation". For testtype = "fastpermutation", it will not perform the permutation tests on the node with more than nmin observations. Default is testtype = "permutation".

alpha

the exponent on Euclidean distance in (0,2] (for regression tree). Default is alpha = 1.

pt

the p-value of the permutation test must be less than in order to implement a split. If pt = 1, hypothesis testing tree will fully split without performing the permutation tests. Default is pt = 0.05.

minsplit

the minimum number of observations in a node in order to be considered for splitting. Default is minsplit = 30.

minbucket

the minimum number of observations in a terminal node. Default is minbucket = round(minsplit/3).

R

the number of permutation replications are used to simulated the distribution of the test statistic. Default is R = 199.

nmin

the minimum number of observations in a node that does not require the permutation test (for testtype = "fastpermutation"). Default is nmin = 1000.

Details

The arguments teststat, testtype and pt determine the hypothesis testing of each split. The argument R is the number of permutations to be used. For the dataset with more than 2000 observations, testtype = "fastpermutation" will be useful to save time.

Value

A list containing the options.

See Also

HTT, htt.object

Examples

## choose the teststat as "energy1"
htt_control(teststat = "energy1")

## choose the p-value 0.01
htt_control(pt = 0.01)

## choose the alpha to 0.5
htt_control(alpha = 0.5)

## change the minimum number of observations in a terminal node
htt_control(minbucket = 7)

## reduce the number of permutation replications to save time
htt_control(R = 99)

HTT documentation built on March 31, 2023, 5:40 p.m.