Diastolic Blood Pressure
bloodp.RdDiastolic blood pressure for a two groups of patients.
Usage
data(bloodp)Format
A data frame with 15 observations on the following 2 variables.
- bp
the diastolic blood pressure.
- group
a factor with levels
group1andgroup2.
Details
The data is given in Table 9.6, page 227, of Metha and Pathel (2001). Note that there are some tied observations. The permutation test using the raw blood pressure values does not lead to a rejection of the null hypothesis of exchangeability: p-value = 0.1040 (two-sided) and p-value = 0.0564 (one-sided). The asymptotic two-sided p-value is 0.1070.
For the Wilcoxon-Mann-Whitney test, the one-sided p-value is 0.0542 and the two-sided one is 0.0989 (Metha & Patel, 2001, page 229).
The one-sided p-value for the v.d.Waeren test is 0.0462 (Metha & Patel, 2001, page 241) and the two-sided p-value is 0.0799.
References
Cyrus R. Mehta & Nitin R. Patel (2001), StatXact-5 for Windows. Manual, Cytel Software Cooperation, Cambridge, USA
Examples
data(bloodp)
# Permutation test
perm.test(bp ~ group, data=bloodp)
#>
#> 2-sample Permutation Test
#>
#> data: bp by group
#> T = 402, p-value = 0.104
#> alternative hypothesis: true mu is not equal to 0
#>
perm.test(bp ~ group, data=bloodp, alternative="greater")
#>
#> 2-sample Permutation Test
#>
#> data: bp by group
#> T = 402, p-value = 0.05641
#> alternative hypothesis: true mu is greater than 0
#>
perm.test(bp ~ group, data=bloodp, exact=FALSE)
#>
#> Asymptotic 2-sample Permutation Test
#>
#> data: bp by group
#> T = 402, p-value = 0.107
#> alternative hypothesis: true mu is not equal to 0
#>
# Wilcoxon-Mann-Whitney test
wilcox.exact(bp ~ group, data=bloodp, conf.int=TRUE, alternative="l")
#>
#> Exact Wilcoxon rank sum test
#>
#> data: bp by group
#> W = 35, p-value = 0.9648
#> alternative hypothesis: true mu is less than 0
#> 95 percent confidence interval:
#> -Inf 20
#> sample estimates:
#> difference in location
#> 9.5
#>
wilcox.exact(bp ~ group, data=bloodp, conf.int=TRUE)
#>
#> Exact Wilcoxon rank sum test
#>
#> data: bp by group
#> W = 35, p-value = 0.0989
#> alternative hypothesis: true mu is not equal to 0
#> 95 percent confidence interval:
#> -4 22
#> sample estimates:
#> difference in location
#> 9.5
#>
# compute the v.d. Waerden test
sc <- cscores(bloodp$bp, type="NormalQuantile")
X <- sum(sc[bloodp$group == "group2"])
round(pperm(X, sc, 11), 4)
#> [1] 0.0462
## IGNORE_RDIFF_BEGIN
round(pperm(X, sc, 11, simulate=TRUE), 4)
#> [1] 0.0376
round(pperm(X, sc, 11, alternative="two.sided"), 4)
#> [1] 0.0799
round(pperm(X, sc, 11, alternative="two.sided", simulate=TRUE), 4)
#> [1] 0.0684
## IGNORE_RDIFF_END
# use scores mapped into integers (cf. dperm)
sc <- cscores(bloodp$bp, type="NormalQuantile", int=TRUE)
X <- sum(sc[bloodp$group == "group2"])
round(pperm(X, sc, 11), 4)
#> [1] 0.0462
round(pperm(X, sc, 11, alternative="two.sided"), 4)
#> [1] 0.0799