View source: R/testscontrasteshipotesis.R
DMKV.test | R Documentation |
Under the assumption that the data come from two independent Normal distributions, it performs the hypothesis test and the confidence interval for the difference of means with known population variances.
DMKV.test(x, y, difmu = 0, sdx, sdy,
alternative = c("two.sided", "less", "greater"), conf.level = 0.95,
...)
x |
numerical vector (non-empty) that contains the data of the first sample. |
y |
numerical vector (non-empty) containing the data of the second sample. |
difmu |
numeric value indicating the value of the difference in population means between the two samples. |
sdx |
numerical value indicating the population standard deviation of the first sample, which is assumed to be known (mandatory). |
sdy |
numeric value indicating the population standard deviation of the second sample, which is assumed to be known (mandatory). |
alternative |
a character string specifying the alternative hypothesis, must be one of |
conf.level |
confidence level of the interval. |
... |
further arguments to be passed to or from methods. |
A list with class "htest"
containing the following components:
statistic |
the value of the test statistic. |
parameter |
sample lengths and population standard deviations. |
p.value |
the p-value for the test. |
conf.int |
confidence interval for the difference of means with known population variances associated with the specified alternative hypothesis. |
estimate |
the estimated difference in means. |
null.value |
the specified hypothesized value of the mean difference. |
alternative |
a character string describing the alternative hypothesis. |
method |
a character string indicating what type of statistical method was performed. |
data.name |
a character string giving the name(s) of the data. |
t.test
data(cars93) # Data set provided with the package
# Maximum price difference (MaxPrice) in means between cars manufactured in the
# US and those manufactured outside, assuming that the variances are known and
# equal to 64 and 169, respectively
var1<-subset(cars93, USA=="nonUS", select=MaxPrice)
var2<-subset(cars93, USA=="US", select=MaxPrice)
DMKV.test(var1, var2, sdx=13, sdy=8, difmu=0,
alternative="greater", conf.level=0.95)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.