Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/E_DHx_HmDm_HT.f.R
Calibrates a taper curve based on at least one diameter measurement and returns the expected diameters and approximate variances
1 | E_DHx_HmDm_HT.f(Hx, Hm, Dm, mHt, sHt = 0, par.lme, R0 = FALSE, ...)
|
Hx |
Numeric vector of stem heights (m) along which to return the expected diameter. |
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. |
par.lme |
List of taper model parameters obtained by
|
R0 |
indicator whether taper curve should interpolate measurements |
... |
not currently used |
calibrates the tree specific taper curve and calculates approximate
confidence intervals, which can be useful for plotting. Uncertainty resulting
from tariff height estimates if tree height was not measured is incorporated.
Using R0
the taper curve can be forced through the measured diameters
(if R0=TRUE
).
a list holding six elements:
DHx: Numeric vector of diameters (cm) (expected value) along the
heights given by Hx
.
Hx: Numeric vector of heights (m) along which to return the expected diameter.
MSE_Mean: Mean squared error for the expected value of the diameter.
CI_Mean: Confidence interval. Matrix of the 95% conf. int. for the expected value of the diameter (cm). First column: lower limit, second column: mean, third column: upper limit.
MSE_Pred: Mean squared error for the prediction of the diameter.
CI_Mean: Prediction interval. Matrix of the 95% conf. int. for the prediction of the diameter (cm). First column: lower limit, second column: mean, third column: upper limit.
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 | #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,])
## Predict the taper curve based on the diameter measurement in 2 m
## height and known height
tc.tree1 <- E_DHx_HmDm_HT.f(Hx=1:tree1$Ht[1],
Hm=tree1$Hx[3],
Dm=tree1$Dx[3],
mHt = tree1$Ht[1],
sHt = 0,
par.lme = SK.par.lme)
#plot the predicted taper curve
plot(tc.tree1$Hx, tc.tree1$DHx, type="l", las=1)
#lower CI
lines(tc.tree1$Hx, tc.tree1$CI_Mean[,1], lty=2)
#upper CI
lines(tc.tree1$Hx, tc.tree1$CI_Mean[,3], lty=2)
#lower prediction interval
lines(tc.tree1$Hx, tc.tree1$CI_Pred[,1], lty=3)
#upper prediction interval
lines(tc.tree1$Hx, tc.tree1$CI_Pred[,3], lty=3)
#add measured diameter used for calibration
points(tree1$Hx[3], tree1$Dx[3], pch=3, col=2)
#add the observations
points(tree1$Hx, tree1$Dx)
## feature of forcing taper curve through measured diameters
i <- c(3, 5)
tc.tree1 <- E_DHx_HmDm_HT.f(Hx=1:tree1$Ht[1],
Hm=tree1$Hx[i],
Dm=tree1$Dx[i],
mHt = tree1$Ht[1],
sHt = 0,
par.lme = SK.par.lme,
R0=FALSE)
tc.tree2 <- E_DHx_HmDm_HT.f(Hx=1:tree1$Ht[1],
Hm=tree1$Hx[i],
Dm=tree1$Dx[i],
mHt = tree1$Ht[1],
sHt = 0,
par.lme = SK.par.lme,
R0=TRUE)
#plot the predicted taper curve
plot(tc.tree1$Hx, tc.tree1$DHx, type="l", las=1)
#added taper curve through measurement
points(x=tc.tree2$Hx, y=tc.tree2$DHx, type="l", lty=2)
#add measured diameter used for calibration
points(tree1$Hx[i], tree1$Dx[i], pch=3, col=2)
#add the observations
points(tree1$Hx, tree1$Dx)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.