## 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
# \donttest{
## 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+hsize,
upper=200000, equidist=FALSE, nr_cpus=1)
# plot results
spBwplot(eusilcM, x="netIncome", cond=NULL)
spBwplot(eusilcM, x="netIncome", cond="rb090", layout=c(1,2))
# }
Run the code above in your browser using DataLab