Type: | Package |
Date: | 2022-10-30 |
Title: | Statistical Analysis and Programming |
Version: | 1.0 |
Description: | The Hypothesis tests for the means of independent or paired groups. This package investigates the normality assumption automatically. Then, it tests the hypothesis tests for two independent or paired group means by using parametric or non-parametric tests. It uses the Shapiro-Wilk test to test the normality assumption. For independent two groups, If data comes from the normal distribution, the package uses the Z or t-test according to whether variances are known. For paired groups, it uses paired t-test under normal data sets. If data does not come from the normal distribution, the package uses the Wilcoxon test for independent and paired cases. |
Author: | Hasan Bulut [aut, cre] |
Maintainer: | Hasan Bulut <hasan.bulut@omu.edu.tr> |
License: | GPL-2 |
Encoding: | UTF-8 |
LazyData: | true |
Depends: | R (≥ 3.5.0) |
Imports: | stats, BSDA |
RoxygenNote: | 7.2.1 |
NeedsCompilation: | no |
Packaged: | 2022-10-30 20:38:01 UTC; HsnBlt |
Repository: | CRAN |
Date/Publication: | 2022-10-31 14:28:36 UTC |
Hypothesis tests for two means
Description
Tests for means of two independent or paired groups.
Usage
TwoSamplesMeans(
x,
y,
var.equal = FALSE,
H1 = "two.sided",
xvar = NULL,
yvar = NULL,
paired = FALSE
)
Arguments
x |
a numeric vector for the data of the first group. |
y |
a numeric vector for the data of the second group. |
var.equal |
a logical variable indicating whether to treat the two variances as being equal |
H1 |
a character string specifying the alternative hypothesis, must be one of "two.sided" (default), |
xvar |
a numeric value for the variance of the first group |
yvar |
a numeric value for the variance of the second group |
paired |
a logical indicating value whether you want |
Details
TwoSamplesMeans
function performs hypothesis
tests on means of independent or paired two
groups. Moreover, this function can decide whether it
will use a parametric or non-parametric test.
Value
a list with 3 elements:
statistic |
the value of the test statistic |
df |
If it is available, the degree of freedom for the test statistic |
p.value |
the p-value for the test |
test |
a character string indicating which method was used |
Author(s)
Hasan BULUT <hasan.bulut@omu.edu.tr>
Examples
x<-c(10, 25, 35, 40, 70, 60, 50, 70, 65, 25)
y<-c(30, 20, 60, 70, 50, 90, 80, 65, 75, 60)
TwoSamplesMeans(x = x,y = y,H1 = "two.sided")
data1
Description
The data set is used in Sample 16.1. The data set consists of 2 variables and 10 observations. This data is imaginary.
Usage
data1