## The format and ordering of the 3 x 2 'x' count matrix,
## and the 3 x 2 'weights' matrix, if specified, must be:
## Treatment Placebo
## Treatment xxx xxx
## Placebo xxx xxx
## Do Not Know xxx xxx
## where the rows are the assignment guesses by the surveyed party,
## and the columns are the actual assignments.
## CRISP example from Bang et al 2004 from table 7
## Note that the paper presents both limits for the one-sided
## intervals for the Bang Index.
x <- matrix(c(82, 27, 25, 29, 170, 83), nrow = 3, ncol = 2, byrow = TRUE)
BI(x)
BI(x, alternative.B = "greater")
BI(x, alternative.B = "less")
## Houweling 2014 et al examples from table 2
## Investigators
## Note that the paper presents both limits for the one-sided
## intervals for the Bang Index.
x <- matrix(c(48, 22, 4, 30, 330, 319), nrow = 3, ncol = 2, byrow = TRUE)
BI(x)
BI(x, alternative.B = "greater")
BI(x, alternative.B = "less")
## Research coordinators
## Note that the paper presents both limits for the one-sided
## intervals for the Bang Index.
x <- matrix(c(94, 52, 11, 44, 289, 284), nrow = 3, ncol = 2, byrow = TRUE)
BI(x)
BI(x, alternative.B = "greater")
BI(x, alternative.B = "less")
## Patients
## Note that the paper presents both limits for the one-sided
## intervals for the Bang Index.
x <- matrix(c(143, 104, 14, 57, 188, 175), nrow = 3, ncol = 2, byrow = TRUE)
BI(x)
BI(x, alternative.B = "greater")
BI(x, alternative.B = "less")
Run the code above in your browser using DataLab