Two-group test

twotest(var, group)

Arguments

var

numeric vector

group

two-levels group vector

Value

No return value

Examples

twotest(runif(20), rep(c("a", "b"), each = 10))
#> 
#> 	Welch Two Sample t-test
#> 
#> data:  var by group
#> t = -0.20038, df = 17.999, p-value = 0.8434
#> alternative hypothesis: true difference in means between group a and group b is not equal to 0
#> 95 percent confidence interval:
#>  -0.2836866  0.2342851
#> sample estimates:
#> mean in group a mean in group b 
#>       0.5933706       0.6180714 
#> 
#> ================================================================================
#> 
#> 	Wilcoxon rank sum exact test
#> 
#> data:  var by group
#> W = 44, p-value = 0.6842
#> alternative hypothesis: true location shift is not equal to 0
#> 
#> ================================================================================
#> 
#> 	Exact two-sample Kolmogorov-Smirnov test
#> 
#> data:  var by group
#> D = 0.2, p-value = 0.9945
#> alternative hypothesis: two-sided
#>