GetListUniqueSplits: Unique splits that leads to children with more than minpart...

Description Usage Arguments Value Examples

View source: R/BayesTreePrior.R

Description

Unique splits that leads to children with more than minpart nodes.

Usage

1
GetListUniqueSplits(x, minpart = 1, MIA = FALSE)

Arguments

x

vector containing the observations of a variable.

minpart

minimum number of observations in the children nodes.

MIA

set to TRUE if you want Missing Incorporated in Attributes (MIA) imputation to be used.

Value

If MIA is TRUE and minpart>1, the possible splits could be different depending on whether we transfer the NAs to the left child or the right child; if this is the case then the function returns a list (v1,v2), where v1 is the vector containing the unique splits that leads to minpart nodes when transferring the NAs to the left child and v2 is the vector containing the unique splits that leads to children with more than minpart nodes when transferring the NAs to the left child. Otherwise, it returns the vector containing the unique splits that leads to children with more than minpart nodes.

Examples

1
2
3
4
GetListUniqueSplits(c(1,4,7,3,0,2,2,3,4,7,7,7),minpart=1)
GetListUniqueSplits(c(1,4,7,3,0,2,2,3,4,7,7,7),minpart=3)
GetListUniqueSplits(c(1,4,7,3,0,2,2,3,4,7,7,7,NA,NA,NA),minpart=1, MIA=TRUE)
GetListUniqueSplits(c(1,4,7,3,0,2,2,3,4,7,7,7,NA,NA,NA),minpart=3, MIA=TRUE)

AlexiaJM/BayesTreePrior documentation built on May 5, 2019, 4:53 a.m.