Hypothesis Testing Tree {HTT} | R Documentation |
Hypothesis Testing Tree
Description
Fit a hypothesis testing tree.
Usage
HTT(formula, data, method, distance, controls = htt_control(...), ...)
Arguments
formula |
a symbolic description of the model to be fit. |
data |
a data frame containing the variables in the model. |
method |
|
distance |
If |
controls |
a list of options that control details of the |
... |
arguments passed to |
Details
Hypothesis testing trees examines the distribution difference over two child nodes by the binary partitioning in a hypothesis testing framework. At each split, it finds the maximum distribution difference over all possible binary partitions, the test statistic is based on generalized energy distance. The permutation test is used to estimate the p-value of the hypothesis testing.
Value
An object of class htt
. See htt.object
.
Author(s)
Jiaqi Hu
See Also
htt_control
, print.htt
, plot.htt
, predict.htt
Examples
## regression
data("Boston", package = "MASS")
Bostonhtt <- HTT(medv ~ . , data = Boston, controls = htt_control(R = 99))
plot(Bostonhtt)
mean((Boston$medv - predict(Bostonhtt))^2)
## classification
irishtt <- HTT(Species ~., data = iris)
plot(irishtt)
mean(iris$Species == predict(irishtt))