Description Usage Arguments Examples
Function plots the estimation results of an object created by the estTable
function.
Provides the possibility to visualize and compare the point estimates and their estimation errors
differentiated by the applied estimation method and estimator.
1 2 |
x |
object of class |
yvar |
if set to |
ncol |
number of columns to plot small area estimations. |
yscale.free |
|
... |
ignored. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ## run onephase estimation:
op.a <- onephase(formula = tvol~1,
data = grisons,
phase_id = list(phase.col = "phase_id_2p", terrgrid.id = 2),
area = list(sa.col = "smallarea", areas = c("A", "B", "C", "D")))
## run small area twophase estimation:
sae.2p.est <- twophase(formula = tvol ~ mean + stddev + max + q75,
data = grisons,
phase_id = list(phase.col = "phase_id_2p", terrgrid.id = 2),
small_area = list(sa.col = "smallarea", areas = c("A", "B","C", "D"),
unbiased = TRUE))
## run small area threephase estimation:
sae.3p.est <- threephase(formula.s0 = tvol ~ mean,
formula.s1 = tvol ~ mean + stddev + max + q75,
data = grisons,
phase_id = list(phase.col = "phase_id_3p", s1.id = 1, terrgrid.id = 2),
small_area=list(sa.col = "smallarea", areas = c("A", "B", "C", "D"),
unbiased = TRUE))
## create estimation table:
sae.table<- estTable(est.list = list(op.a, sae.2p.est, sae.3p.est), add.ci=TRUE,
sae = TRUE, vartypes = c("variance", "g_variance", "ext_variance"))
## plot estimation errors:
plot(sae.table)
## plot point estimates and confidence intervals:
# Hint: --> use ggplot2 functions to modify graphic:
library(ggplot2)
plot(sae.table, yvar = "estimate") +
ylab("Timber Volume [m3/ha]")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.