INFCvpeSUM: Estimate tree bole volume or phytomass for stems groups, with...

INFCvpeSUMR Documentation

Estimate tree bole volume or phytomass for stems groups, with associated accuracy info

Description

Cumulative estimation of the volume or phytomass of groups of trees is just the summation of the values computed with INFCvpe(), but the computation of accuracy estimates is improved using these summation functions.
Two approaches are available.

  • Via INFCvpe_summarise() that processes and returns a data frame

  • or by following aggregation functions within a standard summarise():

    • INFCvpe_sum()

    • INFCvpe_ConfInt()

    • INFCvpe_OutOfDomain()

Usage

INFCvpe_summarise(
  in.data,
  EPPOcode_C,
  dbh_C,
  h_tot_C,
  quantity = "vol",
  p = 0.95
)

INFCvpe_sum(EPPOcode, dbh, h_tot, quantity = "vol")

INFCvpe_ConfInt(EPPOcode, dbh, h_tot, quantity = "vol", p = 0.95)

INFCvpe_OutOfDomain(EPPOcode, dbh, h_tot)

Arguments

in.data

A dataframe (or tibble) containing tally data to be matched with "EPPOcode_C", "dbh_C" and "htot_C" arguments

EPPOcode_C

A string, the name of the column in in.data with the species EPPO codes

dbh_C

A string, the name of the column in in.data with the breast height diameter values

h_tot_C

A string, the name of the column in in.data with the tree total height values

quantity

(default = "vol") A character vector specifying required quantity/ies: c("vol", "dw1" : "dw4"). Use qantities() to decode definitions.

  • for INFCvpe_summarise(), if length(unique(quantity)) > 1, rows in in.data will be replicated for each value.

  • for INFCvpe_SUM functions, length(quantity) must be 1

p

(default p = 95%) probability used to compute cihw (with length = 1 or length = length(dbh))

OPZIONE 2 INFCvpe_SUM functions:

EPPOcode

A character vector with the species EPPO codes (with length = 1 or length = length(dbh))

dbh

A numeric vector with the brest height diameter values

h_tot

A numeric vector with the tree total height values (with length = 1 or length = length(dbh))

Details

Functions developed following Tabacchi et al. (2011), pages 23-26.

Value

  • INFCvpe_summarise() returns a dataframe (tibble) with the grouping columns defined with group_by(), and the following columns:

    • quantity: as additional grouping column,

    • n : number of trees in the group,

    • n_out : the number of (dbh, htot) pairs that are 'out of the domain',

    • est : the estimated value,

    • cihw : confidence interval half width

    • p: probability used computing cihw

  • INFCvpe_SUM - the functions of this family return a numeric vector, aggregating rows within the same group,

    • INFCvpe_sum() returns the sum of the estimated quantities,

    • INFCvpe_ConfInt() returns 'confidence interval half width',

    • INFCvpe_OutOfDomain() returns the number of 'out of domain' (dhb, h_tot) pairs included in the summation

See Also

INFCvpe() to compute individual estimates, with detailed accuracy evaluation

Examples

## Not run: 
Sezione <- function(EPPOcodes){
  # retrive 'Sezione' name, decoding EPPO codes
  INFCspecies %>% 
    dplyr::filter(EPPOcode %in% EPPOcodes) %>%
    dplyr::left_join(INFCcatalog,by = "pag")%>% 
    dplyr::select(section) %>% 
    purrr::pluck(1)
}

tst <- ForIT_test_data %>%
  dplyr::filter(UC != "U0") 
# select Tabachi et al. example data

tst %>%
  dplyr::group_by(specie) %>%
  INFCvpe_summarise("specie", "d130", "h_dendro") %>%
  dplyr::ungroup() %>%
  dplyr::mutate(specie = Sezione(specie),
                dplyr::across(c("est", "cihw"), ~round(.x, 1))
  ) %>%
  dplyr::select(specie, est, cihw) %>%
  dplyr::arrange(specie) %>%
  dplyr::slice(2, 1, 3) %>% 
  t() %>% 
  provideDimnames(base = list(dimnames(.)[[1]], ""), unique=FALSE)
# Compare ForIT (ver 2) output
## specie "Aceri"  "Abete bianco" "Faggio"
## est    "4623.0" "4044.2"       "1079.4"
## cihw   "567.5"  "661.2"        "275.4" 
# with 'Tabella 2' in Tabacchi et al. (2011, pag. 27)
## specie "aceri"  "abete bianco" "faggio"
## est    "4623.0" "4044.2"       "1079.4"
## cihw   "567.4"  "662.4"        "279.2"

# Using 'INFCvpe_summarise()'

## Overall totals
tst %>%
  INFCvpe_summarise("specie", "d130", "h_dendro", quantity = c("vol", "dw4"))

## Group by dbh class ('cld')
tst %>%
  dplyr::mutate(cld = ceiling(d130/5)*5) %>%
  dplyr::group_by(UC, specie, cld) %>%
  INFCvpe_summarise("specie", "d130", "h_dendro")

## Group by sampling unit ('UC')
tst %>%
  dplyr::group_by(UC) %>%
  INFCvpe_summarise("specie", "d130", "h_dendro", quantity = "dw4")

# Using 'INFCvpeSUM' aggregation functions

## Esitmate 'dw4' phytomass, by sampling unit ('UC')
tst %>%
  dplyr::group_by(UC) %>%
  dplyr::summarise(
    n_stems = dplyr::n(),
    OoD = INFCvpe_OutOfDomain(specie, d130, h_dendro),
    dw4 = INFCvpe_sum(specie, d130, h_dendro, quantity = "dw4"),
    dw4_ConfInt = INFCvpe_ConfInt(specie, d130, h_dendro, quantity = "dw4")
  )

## Esitmate volume, by sampling unit ('UC')
tst %>%
  dplyr::group_by(UC) %>%
  dplyr::summarise(
    n_stems = dplyr::n(),
    OoD = INFCvpe_OutOfDomain(specie, d130, h_dendro),
    vol = INFCvpe_sum(specie, d130, h_dendro),
    vol_ConfInt = INFCvpe_ConfInt(specie, d130, h_dendro)
  )

rm(tst, Sezione)

## End(Not run)

ForIT documentation built on Sept. 27, 2023, 1:07 a.m.