Description Usage Arguments Details Value Note Author(s) Examples
Test for independence of subpopulations assigned from mixture model and classification of samples following supplemental information (e.g. sex, clinical groups)
1 | test_independence(H, feature, S)
|
H |
|
feature |
name of the feature to be tested for independence |
S |
reference value for classification of samples according to |
A partitioning of samples found by scan_hetset
is tested
for association with sample classes formed by external categories
(e.g. sex, smoking, age > 50 years, etc.).
Fisher's exact test for independence is applied.
Returns output of fisher.test
function
If scan_hetset
was initiated by a given classification (e.g. sex), the
test must not be executed for the partitioning found by the mixture model and
the initial classification information. Since this would represent some kind
of a tautology.
Daniel Samaga
1 2 3 4 5 6 7 8 9 10 11 12 13 | n_A <- 100
n_B <- 50
A <- matrix(data = rnorm(n = n_A*15,mean = 1,sd = 1),ncol = n_A)
B <- matrix(data = rnorm(n = n_B*15,mean = 3,sd = 2),ncol = n_B)
Hds <- hetset(D = cbind(A,B))
Hds$"group" <- c(rep("A",n_A),rep("B",n_B))
Hds$"score" <- rnorm(ncol(Hds))
rm(A,B,n_A,n_B)
Hds <- scan_hetset(H = Hds,level = "univariate",min_size = 2,
max_size = 3,rel_imp = 0.1,em_steps = 5)
test_independence(H = Hds,feature = "group","A")
test_independence(H = Hds,feature = "group","B")
test_independence(H = Hds,feature = "score",0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.