powered by
Simulate Data Based on a Binomial Distribution
get_data(k, n, p, iter, type = c("matrix", "bhmbasket"))
If type = "matrix" then a matrix is returned, if type = "bhmbasket" then an element with class scenario_list.
type = "matrix"
type = "bhmbasket"
scenario_list
The number of baskets.
The sample size per basket.
Probabilities used to simulate the data
The number of iterations in the simulation. Is ignored if data is specified.
data
Type of output. Use bhmbasket for the BHM and EXNED design and matrix for everything else.
bhmbasket
matrix
For type = "bhmbasket" this is simply a wraper for bhmbasket::simulateScenarios.
bhmbasket::simulateScenarios
get_data(k = 3, n = 20, p = c(0.2, 0.2, 0.5), iter = 1000)
Run the code above in your browser using DataLab