View source: R/PhylogeneticHierarchicalCorrection.R
PhylogeneticHierarchicalCorrection | R Documentation |
Corrects a series of abnormal diameters of the tree using the mean growth of other trees (with a minimum number of trees) of the same species/genus/family/stand of the same diameter class.
PhylogeneticHierarchicalCorrection(
DataTree,
Data,
cresc,
cresc_abs,
cresc_abn,
DBHCor,
Time,
PositiveGrowthThreshold,
NegativeGrowthThreshold,
DBHRange = 10,
MinIndividualNbr = 5,
OtherCrit = NULL,
coef
)
DataTree |
A dataset corresponding to a single tree/stem's (1 IdTree/IdStem) measurements (data.table) The dataset must contain the columns:
|
Data |
Complete dataset (data.table) The dataset must contain the columns:
|
cresc |
Annual diameter increment (numeric) |
cresc_abs |
Absolute diameter increment (not divided by time between 2 values) (numeric) |
cresc_abn |
Abnormal diameter increment positions (numeric) |
DBHCor |
Diameter vector in cm (numeric) |
Time |
Time vector in years (numeric) |
PositiveGrowthThreshold |
in cm/year : a tree widening by more than x cm/year is considered abnormal (numeric, 1 value) |
NegativeGrowthThreshold |
in cm/census : The possible positive measurement error (+n) cannot be corrected until the growth appears abnormal, but a negative measurement error can be allowed until -n (a tree does not decrease). Thus the positive measurement error (+n) is "compensated". (numeric, 1 value) |
DBHRange |
DBH range in cm to take into account to select other trees in the dataset to apply "phylogenetic hierarchical" correction (Default: 10 cm) (numeric, 1 value) |
MinIndividualNbr |
Minimum number of individuals to take into account in "phylogenetic hierarchical" correction (Default: 5) (numeric, 1 value) |
OtherCrit |
Other criteria to select the individuals used for the calculation of the mean growth. Give the name of the column(s) for which the individuals must have the same value as the tree to correct (e.g. c("Plot", "Subplot")) (character) |
coef |
(numeric) Necessary argument in case the number of individuals is insufficient to apply the "phylogenetic hierarchical" correction, and in this case the "individual" correction is applied (see IndividualDiameterShiftCorrection() function) |
It is assumed that these abnormal diameters were measured at a different height than the default. We therefore correct the 1st value with the mean growth of other trees. The following values are corrected from the corrected value of the 1st value, keeping the originally measured growth.
Correct the 1st value in the series:
Find other individual of the same diameter class (DBHRange) as the last value before the one to correct, and of the same species, genus, family or stand than the tree to correct, until the minimum number of individuals required to consider the correction is reached (MinIndividualNbr). Take only their non-abnormal growths that have not been measured to a different HOM than their previous value.
1st abnormal DBH in the series = previous value + mean growth of the other trees
Correct the following values in the series: The other abnormal DBH in the series = previous value + their original growth.
Fill columns:
DBHCor: corrected trees diameter at default HOM
DiameterCorrectionMeth = "species"/"genus"/"family"/"stand"/"shift realignment"
data(TestData)
DataTree <- TestData[IdTree %in% "100658"]
# Inputs
DataTree$Year <- c(2000, 2002, 2004, 2006, 2008, 2010)
DataTree$Diameter <- c(13, 14, 15, 12, 13, 14)
cresc <- c(0.5, 0.5, NA, 0.5, 0.5)
cresc_abs <- c(1, 1, NA, 1, 1)
cresc_abn <- 3
DataTree_output <- PhylogeneticHierarchicalCorrection(
DataTree = DataTree,
Data = TestData,
cresc = cresc, cresc_abs = cresc_abs, cresc_abn = cresc_abn,
DBHCor = DataTree$Diameter, Time = DataTree$Year,
PositiveGrowthThreshold = 5,
NegativeGrowthThreshold = -2,
DBHRange = 10, MinIndividualNbr = 5,
OtherCrit = "Plot"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.