sim_random_aspre {OptHoldoutSize} | R Documentation |
Simulate random dataset similar to ASPRE training data
Description
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.
Usage
sim_random_aspre(n, params = NULL)
Arguments
n |
size of population |
params |
list of parameters |
Value
Matrix of samples
Examples
# 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))
[Package OptHoldoutSize version 0.1.0.0 Index]