## these take some time and are not run automatically
## copy & paste to the R command line
set.seed(1234) # for reproducibility
data(eusilcS) # load sample data
if (FALSE) {
## approx. 20 seconds computation time
inp <- specifyInput(data=eusilcS, hhid="db030", hhsize="hsize",
strata="db040", weight="db090")
simPop <- simStructure(data=inp, method="direct",
basicHHvars=c("age", "rb090", "hsize", "pl030", "pb220a"))
# multinomial model with random draws
eusilcM <- simContinuous(simPop, additional="netIncome",
regModel = ~rb090+hsize+pl030+pb220a,
upper=200000, equidist=FALSE, nr_cpus=1)
class(eusilcM)
# plot results
spCdfplot(eusilcM, "netIncome", cond=NULL)
spCdfplot(eusilcM, "netIncome", cond="rb090", layout=c(1,2))
}
Run the code above in your browser using DataLab