# These examples are the same as those in prop.test.
heads <- rbinom(1, size = 100, prob = .5)
prop.test(heads, 100, correct = FALSE)
pdpropper( heads, 100 )
## Data from Fleiss (1981), p. 139.
## H0: The null hypothesis is that the four populations from which
## the patients were drawn have the same true proportion of smokers.
## A: The alternative is that this proportion is different in at
## least one of the populations.
smokers <- c( 83, 90, 129, 70 )
patients <- c( 86, 93, 136, 82 )
prop.test(smokers, patients)
pdpropper( smokers, patients )
Run the code above in your browser using DataLab