Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/e_vol_ab_hmdm_ht.f_1.R
Estimate volume for a complete stem from bottom to tip or for a section defined by lower and upper diameter or height. Variances for estimated volumes are calculated.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | E_VOL_AB_HmDm_HT.f(
Hm,
Dm,
mHt,
sHt = 0,
A = NULL,
B = NULL,
iDH = "D",
par.lme,
R0 = FALSE,
IA = F,
nGL = 51,
...
)
|
Hm |
Numeric vector of stem heights (m) along which diameter
measurements were taken for calibration. Can be of length 1. Must be of same
length as |
Dm |
Numeric vector of diameter measurements (cm) taken for calibration.
Can be of length 1. Must be of same length as |
mHt |
Scalar. Tree height (m). |
sHt |
Scalar. Standard deviation of stem height. Can be 0 if height was measured without error. |
A |
Numeric scalar defining the lower threshold of a stem section for
volume estimation. Depends on |
B |
Numeric scalar defining the upper threshold of a stem section for
volume estimation. Depends on |
iDH |
Character scalar. Either "D" or "H". Type of threshold for section
volume estimation. See |
par.lme |
List of taper model parameters obtained by
|
R0 |
indicator whether taper curve should interpolate measurements |
IA |
Logic scalar. If TRUE, variance calculation of height estimate based on 2-point distribution. If FALSE, variance calculation of height estimate based on Normal approximation. |
nGL |
Numeric scalar. Number of support points for numerical integration. |
... |
not currently used |
calculates the volume for a complete stem or sections defined by
A
and B
, which might be defined as diameter or height. The
parameter R0
determines whether the estimated taper curve is forced
through the measured points (if R0=TRUE
).
a list holding nine elements:
E_VOL: Estimated volume (m^3).
VAR_VOL: Variance of the volume estimate.
Hm: Height of diameter measurement (m).
Dm: Diameter measurement (cm).
Ht: Tree height (m).
Da: Diameter at lower section threshold (cm).
Db: Diameter at upper section threshold (cm).
Ha: Height at lower section threshold (m).
Hb: Height at upper section threshold (m).
R0: Taper curve forced through measurements (if TRUE) or not (if FALSE).
Edgar Kublin
Kublin, E., Breidenbach, J., Kaendler, G. (2013) A flexible stem taper and volume prediction method based on mixed-effects B-spline regression, Eur J For Res, 132:983-997.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | #example data
data(DxHx.df)
taper curve parameters based on all measured trees
data(SK.par.lme)
#select data of first tree
Idi <- (DxHx.df[,"Id"] == unique(DxHx.df$Id)[1])
(tree1 <- DxHx.df[Idi,])
## Calculate the timber volume for the whole stem
VOL <- E_VOL_AB_HmDm_HT.f(Hm=tree1$Hx[3],
Dm=tree1$Dx[3],
mHt = tree1$Ht[1],
sHt = 0, # no height variance assumed
par.lme = SK.par.lme)
VOL$E_VOL #' expected value
VOL$VAR_VOL #' corresponding variance
VOL$R0
## Calculate the timber volume for the whole stem, using R0=TRUE
VOL <- E_VOL_AB_HmDm_HT.f(Hm=tree1$Hx[3],
Dm=tree1$Dx[3],
mHt = tree1$Ht[1],
sHt = 0, # no height variance assumed
par.lme = SK.par.lme,
R0 = TRUE)
VOL$E_VOL #' expected value
VOL$VAR_VOL #' corresponding variance
VOL$R0
## Calculate the timber volume for the whole stem
VOL <- E_VOL_AB_HmDm_HT.f(Hm=tree1$Hx[3],
Dm=tree1$Dx[3],
mHt = tree1$Ht[1],
sHt = 1, # no height variance assumed
par.lme = SK.par.lme)
VOL$E_VOL #' expected value
VOL$VAR_VOL #' corresponding variance
VOL$R0
## Calculate the timber volume for the whole stem, using R0=TRUE
VOL <- E_VOL_AB_HmDm_HT.f(Hm=tree1$Hx[3],
Dm=tree1$Dx[3],
mHt = tree1$Ht[1],
sHt = 1, # height variance assumed
par.lme = SK.par.lme,
R0 = TRUE)
VOL$E_VOL #' expected value
VOL$VAR_VOL #' corresponding variance
VOL$R0
## Calculate the timber volume for a selected section given a height (0.3 - 5 m)
VOL <- E_VOL_AB_HmDm_HT.f(Hm=tree1$Hx[3],
Dm=tree1$Dx[3],
mHt = tree1$Ht[1],
sHt = 1,
par.lme = SK.par.lme,
A=0.3,
B=5,
iDH = "H")
VOL$E_VOL #' expected value
VOL$VAR_VOL #' corresponding variance
VOL$R0
## Calculate the timber volume for a selected section given a height (0.3 - 5 m)
VOL <- E_VOL_AB_HmDm_HT.f(Hm=tree1$Hx[3],
Dm=tree1$Dx[3],
mHt = tree1$Ht[1],
sHt = 1,
par.lme = SK.par.lme,
A=0.3,
B=5,
iDH = "H",
R0=TRUE)
VOL$E_VOL #' expected value
VOL$VAR_VOL #' corresponding variance
VOL$R0
## Calculate the timber volume for a selected section given a diameter
## threshold (30cm - 15cm) (negative value if A<B)
VOL <- E_VOL_AB_HmDm_HT.f(Hm=tree1$Hx[3],
Dm=tree1$Dx[3],
mHt = tree1$Ht[1],
sHt = 1,
par.lme = SK.par.lme,
A=30,
B=15,
iDH = "D")
VOL$E_VOL #' expected value
VOL$VAR_VOL #' corresponding variance
## Not run:
## The variance estimate resulting from the tree height uncertainty using
## a Normal approximation takes much longer...
ptm <- proc.time()
E_VOL_AB_HmDm_HT.f(Hm=tree1$Hx[3], Dm=tree1$Dx[3], mHt = tree1$Ht[1],
sHt = 1, par.lme = SK.par.lme, IA=FALSE)
proc.time() - ptm
##... than the calculation using a 2-point distribution...
ptm <- proc.time()
E_VOL_AB_HmDm_HT.f(Hm=tree1$Hx[3], Dm=tree1$Dx[3], mHt = tree1$Ht[1],
sHt = 1, par.lme = SK.par.lme, IA=TRUE)
proc.time() - ptm
##...fastest if no height variance is assumed
ptm <- proc.time()
E_VOL_AB_HmDm_HT.f(Hm=tree1$Hx[3], Dm=tree1$Dx[3], mHt = tree1$Ht[1],
sHt = 0, par.lme = SK.par.lme, IA=FALSE)
proc.time() - ptm
## Also the number of supportive points for the numerical integration
## influences the calculation time
ptm <- proc.time()
E_VOL_AB_HmDm_HT.f(Hm=tree1$Hx[3], Dm=tree1$Dx[3], mHt = tree1$Ht[1],
sHt = 0, par.lme = SK.par.lme, IA=FALSE, nGL=10)
proc.time() - ptm
##' End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.