modelHD: Fitting height-diameter models

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This function fits and compares (optional) height-diameter models.

Usage

1
2
modelHD(D, H, method = NULL, useWeight = FALSE, drawGraph = FALSE,
  plot = NULL)

Arguments

D

Vector with diameter measurements (in cm). NA values are accepted but a minimum of 10 valid entries (i.e. having a corresponding height in H) is required.

H

Vector with total height measurements (in m). NA values are accepted but a minimum of 10 valid entries (i.e. having a corresponding diameter in D) is required.

method

Method used to fit the relationship. To be chosen between:

  • log1, log2, log3

    • log 1: (log(H) = a+ b*log(D)) (equivalent to a power model)

    • log 2: (log(H) = a+ b*log(D) + c*log(D)^2)

    • log 3: (log(H) = a+ b*log(D) + c*log(D)^2 + d*log(D)^3)

  • weibull: H = a*(1-exp(-(D/b)^c))

  • michaelis: H = (A * D)/(B + D)

If NULL, all the methods will be compared.

useWeight

If weight is TRUE, model weights will be (D^2)*H (i.e. weights are proportional to tree volume, so that larger trees have a stronger influence during the construction of the model).

drawGraph

If TRUE, a graphic will illustrate the relationship between H and D. Only if argument plot is null.

plot

(optional) Plot ID, must be either one value, or a vector of the same length as D. This argument is used to build stand-specific HD models.

Details

All the back transformations for log-log models are done using the Baskerville correction (0.5 * RSE^2, where RSE is the Residual Standard Error).

Value

If you have just one plot or NULL, there will be just the one of those result. However, if there is multiple plot, there will be the list with the names of the plot and inside each item their is those results. Returns a list with if the parameter model is not null:

If the parameter model is null, the function return a graph with all the methods for comparison, the function also return a data.frame with:

Author(s)

Maxime REJOU-MECHAIN, Arthur PERE, Ariane TANGUY

See Also

retrieveH()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# Load a data set
data(NouraguesHD)

# To model the height from a dataset
## Not run: 
HDmodel <- modelHD(D = NouraguesHD$D, H = NouraguesHD$H, drawGraph = TRUE)

## End(Not run)

# If the method needed is known
HDmodel <- modelHD(D = NouraguesHD$D, H = NouraguesHD$H, method = "weibull", drawGraph = TRUE)
HDmodel <- modelHD(D = NouraguesHD$D, H = NouraguesHD$H, method = "log1", drawGraph = TRUE)

# Using weights
HDmodel <- modelHD(
  D = NouraguesHD$D, H = NouraguesHD$H, method = "weibull", useWeight = TRUE,
  drawGraph = TRUE
)

ArthurPERE/biomass documentation built on May 18, 2019, 2:33 a.m.