Learn R Programming

forestinventory (version 1.0.0)

estTable: estTable

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

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:

  • area: in case of small area estimations: the name of the small area

  • estimate: the point estimates

  • vartype: the type of variance

  • variance: the variance values

  • std: the standard errors (square root of variance values)

  • error: the estimation errors defined as the ratio between standard error and point estimate

  • domain: indicating if current row belongs to a smallarea or global estimation

  • estimator: the estimator that that was applied

  • method: the estimation method that was applied

  • n2: terrestrial sample size in entire inventory area

  • n1: first phase sample size in entire inventory area

  • n0: in case of threephase estimations: zero phase sample size in entire inventory area

  • n2G: terrestrial sample size in small area

  • n1G: first phase sample size in small area

  • n0G: in case of threephase estimations: zero phase sample size in small area

  • r.squared: coefficient of determination of regression model

  • r.squared_reduced: in case of threephase estimations: coefficient of determination of reduced regression model

  • r.squared_full: in case of threephase estimations: coefficient of determination of full regression model

  • ci_lower: if add.ci=TRUE: lower confidence limit

  • ci_upper: if add.ci=TRUE: upper confidence limit

Examples

Run this code
# NOT RUN {
## 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)
# }

Run the code above in your browser using DataLab