# Non-contaminated normal BAR(1) tree:
bfa_tree_gen(127, 1, 1, 1, 0.5, 0.5, 0, 10, c(0.7))
# Non-contaminated normal BAR(2) tree:
bfa_tree_gen(127, 2, 1, 1, 0.5, 0.5, 0, 10, c(0.5, 0.3))
# Contaminated normal BAR(1) tree:
bfa_tree_gen(127, 1, 1, 2, 0.5, 0.5, 0.2, 10, c(0.7))
# BAR(1) tree with error generated from skewed normal distribution with skewness equals to -3:
bfa_tree_gen(127, 1, 1, 2, 0.5, 0.5, 0, 10, c(0.7),dist="snorm",-3)
# BAR(2) tree with error generated from skewed normal distribution with skewness equals to 3:
bfa_tree_gen(127, 2, 1, 2, 0.5, 0.5, 0, 10, c(0.7,0.5),dist="snorm",3)
# BAR(1) tree with error generated from skewed-t distribution with skewness equals
# to -3 and df equals to 10:
bfa_tree_gen(127, 1, 1, 2, 0.5, 0.5, 10, 10, c(0.7),dist="st",-3)
# BAR(2) tree with error generated from skewed-t distribution with skewness equals
# to 3 and df equals to 1:
bfa_tree_gen(127, 2, 1, 2, 0.5, 0.5, 10, 10, c(0.7,0.5),dist="st",3)
Run the code above in your browser using DataLab