This recursion function conducts the Biswas and Ghosh multivariate test based on the dendrogram from the hierarchical clustering of the average distance matrix of the unsupervised random forest.
recursive.test(
dend,
df,
cateVar = NULL,
ordinalVar = NULL,
cohortid.var = "cohortid",
alpha.level = 0.05,
verbose = T,
saveIntermediate = F,
BG.method = "asymptotic",
n_perm = 200,
N_auto = 50,
impute = T,
miceArgs = list(method = "mean", maxit = 1)
)
dendrogram object from the stat::as.as.dendrogram()
data.frame
string or vector, names of variables are categorical, which will be converted into dummy variables
string or vector, names of variables are ordinal factors, which will be converted into numeric variables
string, name of the cohort id indicator in the relate::df
numeric, alpha level for statistical significance of the BG test
boolean, whether to print the intermediate test results at each round
boolean, whether to save the intermediate test result in the final output
string, "asymptotic","permutation","automatic", see relate::BGcompare
above
number of permutation if method is permutation
integer, the sample size for automatically choosing between asymptotic and permutation, below is permutation, above is asymptotic
boolean, whether to conduct MICE imputation within clusters before testing
list, a list of arguments parse into mice::mice