This function shows the D-value of a hypothesis test for two samples using summarized values, not the vectors.

d_meantest(meanx, varx, meany, vary, alternative = "less", nrep = 1e+06)

Arguments

meanx

sample mean for sample x.

varx

sample variance for sample x.

meany

sample mean for sample y.

vary

sample variance for sample y.

alternative

a character string specifying the alternative hypothesis, must be one of "less" (default), "greater" or "two.sided". You can specify just the initial letter.

nrep

number of repetions to obtain the D-value, by default is 1000000

Value

A list with class "htest" containing the following components:

d.value

the d-value for the test.

estimate

the estimated mean or difference in means depending on whether it was a one-sample test or a two-sample test.

alternative

a character string describing the alternative hypothesis.

method

a character string indicating the type of test performed.

Details

In this case, it is important to explain that the sample size is assumed as n = 1 because the D-value provides an individual analysis.

Examples

# --- Examples with TWO-SAMPLES and equal variances ---
d_meantest(meanx=250, varx=20^2, meany=249, vary=20^2, alternative='greater')
#> 
#> 	Two Sample d.test
#> 
#> data:  The D-value was calculated using nrep= 1e+06
#> d.value = 0.5135
#> alternative hypothesis: greater
#> sample estimates:
#> mean of x mean of y 
#>       250       249 
#>