Description Usage Format Details Source References Examples
A subset of data from a study on the relationship between maternal alcohol consumption and congenital malformations.
1 
A data frame with 32574 observations on 2 variables.
consumption
alcohol consumption, an ordered factor with levels "0"
,
"<1"
, "12"
, "35"
and ">=6"
.
malformation
congenital sex organ malformation, a factor with levels "Present"
and "Absent"
.
Data from a prospective study undertaken to determine whether moderate or light drinking during the first trimester of pregnancy increases the risk for congenital malformations (Mills and Graubard, 1987). The subset given here concerns only sex organ malformation (Mills and Graubard, 1987, Tab. 4).
This data set was used by Graubard and Korn (1987) to illustrate that different choices of scores for ordinal variables can lead to conflicting conclusions. Zheng (2008) also used the data, demonstrating two different scoreindependent tests for ordered categorical data; see also Winell and Lindbäck (2018).
Mills, J. L. and Graubard, B. I. (1987). Is moderate drinking during pregnancy associated with an increased risk for malformations? Pediatrics 80(3), 309–314.
Graubard, B. I. and Korn, E. L. (1987). Choice of column scores for testing independence in ordered 2 x K contingency tables. Biometrics 43(2), 471–476. doi: 10.2307/2531828
Winell, H. and Lindbäck, J. (2018). A general scoreindependent test for orderrestricted inference. Statistics in Medicine 37(21), 3078–3090. doi: 10.1002/sim.7690
Zheng, G. (2008). Analysis of ordered categorical data: Two scoreindependent approaches. Biometrics 64(4), 1276–1279. doi: 10.1111/j.15410420.2008.00992.x
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40  ## Graubard and Korn (1987, Tab. 3)
## Onesided approximative (Monte Carlo) CochranArmitage test
## Note: midpoint scores (p < 0.05)
midpoints < c(0, 0.5, 1.5, 4.0, 7.0)
chisq_test(malformation ~ consumption, data = malformations,
distribution = approximate(nresample = 1000),
alternative = "greater",
scores = list(consumption = midpoints))
## Onesided approximative (Monte Carlo) CochranArmitage test
## Note: midrank scores (p > 0.05)
midranks < c(8557.5, 24375.5, 32013.0, 32473.0, 32555.5)
chisq_test(malformation ~ consumption, data = malformations,
distribution = approximate(nresample = 1000),
alternative = "greater",
scores = list(consumption = midranks))
## Onesided approximative (Monte Carlo) CochranArmitage test
## Note: equally spaced scores (p > 0.05)
chisq_test(malformation ~ consumption, data = malformations,
distribution = approximate(nresample = 1000),
alternative = "greater")
## Not run:
## Onesided approximative (Monte Carlo) scoreindependent test
## Winell and Lindbaeck (2018)
(it < independence_test(malformation ~ consumption, data = malformations,
distribution = approximate(nresample = 1000,
parallel = "snow",
ncpus = 8),
alternative = "greater",
xtrafo = function(data)
trafo(data, ordered_trafo = zheng_trafo)))
## Extract the "best" set of scores
ss < statistic(it, type = "standardized")
idx < which(ss == max(ss), arr.ind = TRUE)
ss[idx[1], idx[2], drop = FALSE]
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.