View source: R/OptHoldoutSize_aspre.R
sim_random_aspre | R Documentation |
Generate random population of individuals (e.g., newly pregnant women) with given population parameters
Assumes independence of parameter variation. This is not a realistic assumption, but is satisfactory for our purposes.
sim_random_aspre(n, params = NULL)
n |
size of population |
params |
list of parameters |
Matrix of samples
# Load ASPRE related data
data(params_aspre)
X=sim_random_aspre(1000,params_aspre)
print(c(median(X$age),params_aspre$age$median))
print(rbind(table(X$parity)/1000,params_aspre$parity$freq))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.