Description Usage Arguments Value Examples
This function can be conveniently used in simulations such as a monte carlo sample size calculations.
1 | draw.binom(ss, theta1 = 0.3, theta2 = 0.7, row.prop = 1/2, matrix = FALSE)
|
ss |
a positive integer representing the sample size |
theta1 |
the probability of success of the first group |
theta2 |
the probability of success of the second group |
row.prop |
the proportion of observations in the first group. Default is 1/2. |
matrix |
a logical for whether to return a matrix or data frames. Default is FALSE. |
If the argument matrix is FALSE, a list containing a (0,1) group indicator data frame and a (0,1) response data frame, each with ss rows and one column. If the argument matrix is TRUE, a 2x2 matrix storing the data in a contingency table.
1 | out <- draw.binom(100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.