height.constrain: height.constrain

Description Usage Arguments Value Author(s)

View source: R/height_constrain.r

Description

Modify selection of fitted height-diameter models to avoid models that overpredict over a threshold maximum height

Usage

1
2
height.constrain(fit, data, level, dbh = "D4", max.size = 80,
  na.too.big = FALSE, forest.type = TRUE)

Arguments

fit

Fitted height-diameter models object returned by /codehd.fit.

data

Object returned by /codemergefp.

level

Level to fit height-diameter model. One of "Plot", "Cluster", "BioR" and "Continent". Must match level used whe constructing fit object.

dbh

Name of column containing diameter measurements. Default is "D4".

max.size

Maximum tree height. If all models predict the height of the largest tree in the plot to be below this, then the model with the lowest AGB prediction error will be used. Otherwise models predicting heights above this will be excluded from selection. If all models predict heights above this, then the model giving the lowest maximum height will be selected.

na.too.big

Logical. Should parameters be set to NA if all models exceed height treshold. Default is FALSE.

forest.type

Logical. Should ID include forest type.

Value

Dataframe with components returned by /codehd.fit, but with addtional columns giving the maximum diameter of the largest tree in the plot, the predicted maximum height using each model, and a column indicating whether the choice of best model was modified (0 = no change, 1 = previous best model excluded due to exceeding threshold, 2 = all models exceeded height threshold).

Author(s)

Martin Sullivan


GabrielaLopez/BiomasaFP documentation built on June 23, 2020, 9:12 p.m.