estTable: estTable

Description Usage Arguments Value Note Examples

View source: R/esttable.R

Description

estTable can be used to compare the results of onephase to multiphase estimations (twophase, threephase). It restructures the estimation results into a table that can be used to plot the estimation results and provides the basis for further analysis.

Usage

1
2
3
4
5
6
estTable(
  est.list,
  sae = FALSE,
  add.ci = TRUE,
  vartypes = c("variance", "ext_variance", "g_variance")
)

Arguments

est.list

a list object containing at least one multiphase estimation object created by the twophase or threephase function and the respective onephase estimation object.

sae

an object of type logical. Has to be set to TRUE if results of small area estimations are passed to estTable. Defaults to FALSE.

add.ci

logical: Should confidence intervals be added? Defaults to TRUE.

vartypes

Specifying the variances that should be included in the estimation table. Has to be specified as a character vector. The full set contains "variance", "ext_variance" and "g_variance".

Value

estTable returns a list of the following components:

Note

An estimation object of class onephase as input is mandatory

Examples

 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
## 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 with confidence intervals:
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"))

sae.table.df<- as.data.frame(sae.table)

AndreasChristianHill/forestinventory documentation built on Aug. 16, 2021, 2:13 p.m.