Description Usage Arguments Details Value Author(s) References See Also Examples
weighted.z
is used to perform Liptak's weighted Z-test
for partially matched samples, specified by giving a data frame or matrix,
testing hypothesis, true mean, the corresponding weights in Liptak's
weighted Z-test and confidence level.
1 2 3 4 5 6 7 8 9 |
data |
a 2-by-n or n-by-2 partially matched samples data frame or matrix. |
alternative |
a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less". You can specify just the initial letter. |
mu |
a number indicating the true difference in means. |
w1 |
a number indicating the weight for the first p-value. If the weight is not inputted, a default weight is assigned to to be the square root of two times the paired sample size. |
w2 |
a number indicating the weight for the second p-value. If the weight is not inputted, a default weight is assigned to to be the square root of the sum of the two independent samples size. |
conf.level |
confidence level for the returned confidence interval. |
... |
further arguments to be passed to or from methods. |
Whether the dataset input is partially matched samples will be checked. If not, appropriate hypothesis tests, such as one and two sample t-tests, will be performed instead.
A list with class "htest" containing the following components:
|
the value of the test statistic. |
|
the degrees of freedom of the test statistic or NA. |
|
the p-value of the test. |
|
a confidence interval for the mean appropriate to the specified alternative hypothesis. |
|
the estimated mean or difference in means. |
|
the specified hypothesized value of the mean or mean difference. |
|
the standard error of the mean (difference). |
|
a character string describing the alternative hypothesis. |
|
a character string indicating what type of test was performed. |
|
a character string giving the name(s) of the data. |
Kai Li kai.li@stonybrook.edu
Kuan P F, Huang B. A simple and robust method for partially matched samples using the p-values pooling approach. Statistics in medicine. 2013; 32(19): 3247-3259.
Liptak T. On the combination of independent tests. Magyar Tudom Aanyos Akad Aemia Matematikai Kutat Ao Intezetenek Kozlemenyei. 1958; 3:171-197.
t.test
for the one and two-sample t-tests.
var.test
for the F test to compare two variances.
shapiro.test
for the Shapiro-Wilk test of normality.
wilcox.test
for the one and two-sample Wilcoxon tests.
modified.t
, corrected.z
,
mle.hetero
, and mle.homo
for other statistical
approaches for partially matched samples.
1 2 3 4 5 6 7 | # pm is a sample dataset for the PMLi package
# Liptak's weighted Z-test formula interface
weighted.z(pm, "less", conf.level = 0.99)
# p-value of Liptak's weighted Z-test
p.value1 <- weighted.z(pm)$p.value
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.