Description Usage Arguments Details Value Author(s) See Also Examples
This function fits and compares (optional) height-diameter models.
1 2 |
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:
If |
useWeight |
If weight is |
drawGraph |
If |
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. |
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).
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:
input
: list of the data used to construct the model (list(H, D))
model
: outputs of the model (same outputs as given by stats::lm()
, stats::nls()
)
RSE
: Residual Standard Error of the model
RSElog
: Residual Standard Error of the log model (NULL
if other model)
residuals
: Residuals of the model
coefficients
: Coefficients of the model
R.squared
: R^2 of the model
formula
: Formula of the model
method
: Name of the method used to construct the model
predicted
: Predicted height values
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:
method
: The method that had been used to construct the graph
color
: The color of the curve in the graph
RSE
: Residual Standard Error of the model
RSElog
: Residual Standard Error of the log model (NULL
if other model)
Average_bias
: The average bias for the model
Maxime REJOU-MECHAIN, Arthur PERE, Ariane TANGUY
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
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.