height.constrain: height.constrain

View source: R/height_constrain.r

height.constrainR Documentation

height.constrain

Description

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

Usage

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

Arguments

fit

Fitted height-diameter models object returned by hd.fit.

data

Object returned by mergefp.

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.

weib.only

Logical. Should consideration of best models be restricted to Weibull form (except if don't converge). Defauly is FALSE.

Value

Dataframe with components returned by hd.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


ForestPlots/BiomasaFP documentation built on April 28, 2023, 8:26 a.m.