spMosaic | R Documentation |
Create mosaic plots of expected (i.e., estimated) and realized (i.e., simulated) population sizes.
spMosaic(x, method = c("split", "color"), ...)
x |
An object of class |
method |
A character string specifying the plot method. Possible values
are |
... |
if |
If method
is "split"
, the two tables of expected and realized
population sizes are combined into a single table, with an additional
conditioning variable indicating expected and realized values. A conditional
plot of this table is then produced using cotabplot
.
Andreas Alfons and Bernhard Meindl
M. Templ, B. Meindl, A. Kowarik, A. Alfons, O. Dupriez (2017) Simulation of Synthetic Populations for Survey Data Considering Auxiliary Information. Journal of Statistical Survey, 79 (10), 1–38. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v079.i10")}
A. Alfons, M. Templ (2011) Simulation of close-to-reality population data for household surveys with application to EU-SILC. Statistical Methods & Applications, 20 (3), 383–407. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/02664763.2013.859237")}
spTable
, cotabplot
,
strucplot
set.seed(1234) # for reproducibility
## Not run:
data(eusilcS) # load sample data
samp <- specifyInput(data=eusilcS, hhid="db030", hhsize="hsize",
strata="db040", weight="db090")
eusilcP <- simStructure(data=samp, method="direct", basicHHvars=c("age","rb090"))
abb <- c("B","LA","Vi","C","St","UA","Sa","T","Vo")
tab <- spTable(eusilcP, select=c("rb090", "db040", "hsize"))
# expected and realized population sizes
spMosaic(tab, method = "split",
labeling=labeling_border(abbreviate=c(db040=TRUE)))
# realized population sizes colored according to relative
# differences with expected population sizes
spMosaic(tab, method = "color",
labeling=labeling_border(abbreviate=c(db040=TRUE)))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.