Skip to contents

Looks the independence between the categories and the batches.

Usage

evaluate_independence(i, pheno)

Arguments

i

Index of subsets.

pheno

A data.frame with the information about the samples.

Value

Returns a vector with the p-values of the chisq.test between the category and the subset.

See also

Other functions to evaluate samples: evaluate_entropy(), evaluate_index(), evaluate_mad(), evaluate_mean(), evaluate_na(), evaluate_orig(), evaluate_sd()

Other functions to evaluate categories: evaluate_entropy(), evaluate_na()

Examples

data(survey, package = "MASS")
index <- design(survey[, c("Sex", "Smoke", "Age")], size_subset = 50,
                iterations = 10)
#> Warning: There might be some problems with the data use check_data().
# Note that numeric columns will be omitted:
evaluate_independence(index, survey[, c("Sex", "Smoke", "Age")])
#>        Sex      Smoke 
#> 0.09211905 0.50037711