Skip to contents

Print the decision (as well as other useful information) of the statistical test with null hypothesis corresponding to the equality of unknown component distributions in admixture models. More precisely, given two (or more) admixture models with cumulative distribution functions (CDF) L1 and L2, where Li = pi*Fi + (1-pi)*Gi i=1,2 and Gi are the known CDFs, the function performs the test: H0: F1 = F2 versus H1: F1 != F2.

Usage

# S3 method for admix_test
print(x, ...)

Arguments

x

An object of class 'admix_test' (see ?admix_test).

...

further arguments passed to or from other methods.

Author

Xavier Milhaud xavier.milhaud.research@gmail.com

Examples

##### On a simulated example, with 1 sample (gaussianity test):
list.comp <- list(f1 = "norm", g1 = "norm")
list.param <- list(f1 = list(mean = 0, sd = 1), g1 = list(mean = 2, sd = 0.7))
## Simulate data:
sim1 <- rsimmix(n = 300, unknownComp_weight = 0.85, comp.dist = list(list.comp$f1,list.comp$g1),
                comp.param = list(list.param$f1, list.param$g1))$mixt.data
## Perform the test hypothesis:
list.comp <- list(f1 = NULL, g1 = "norm")
list.param <- list(f1 = NULL, g1 = list(mean = 2, sd = 0.7))
gaussTest <- admix_test(samples = list(sim1), sym.f = TRUE, test.method = 'Poly', sim_U = NULL,
                        n_sim_tab = 50, min_size = NULL, comp.dist = list.comp,
                        comp.param = list.param, support = "Real", conf.level = 0.95,
                        parallel = FALSE, n_cpu = 2)
#> Warning: Still needs to be implemented for cases where the unknown density mean is lower then the known density one!
#> Warning: Still needs to be implemented for cases where the unknown density mean is lower then the known density one!
print(gaussTest)
#> Call:
#> admix_test(samples = list(sim1), sym.f = TRUE, test.method = "Poly", 
#>     sim_U = NULL, n_sim_tab = 50, min_size = NULL, comp.dist = list.comp, 
#>     comp.param = list.param, support = "Real", conf.level = 0.95, 
#>     parallel = FALSE, n_cpu = 2)
#> 
#> Is the null hypothesis rejected? FALSE
#> The type-I error is fixed to 5%
#> The p-value of the test equals 0.7315478
#> The value of the test statistics is 0.1176952
#>