guide_curve {forestmangr} | R Documentation |
Get the guide curve plot for growth and yield analysis of inventory data
Description
Get the guide curve for growth and yield analysis of inventory data using the factor method, and different statistical models.
Usage
guide_curve(
df,
dh,
age,
age_index,
n_class = 4,
model = "Schumacher",
start_chap = c(b0 = 23, b1 = 0.03, b2 = 1.3),
start_bailey = c(b0 = 3, b1 = -130, b2 = 1.5),
round_classes = FALSE,
font = "serif",
gray_scale = TRUE,
output = "plot"
)
Arguments
df |
A data frame. |
dh |
Quoted name for the dominant height variable. |
age |
Quoted name for the age variable. |
age_index |
Numeric value for the age index. |
n_class |
Numeric value for the number of classes used to divide the data. Default |
model |
model used to fit dh as a function of age. The models available are |
start_chap |
Numeric vector with the start values for the Chapman-Richards model. This must be a named vector, with b0, b1 and b2 as parameter names. Default: |
start_bailey |
Numeric vector with the start values for the Bailey-Clutter model. This must be a named vector, with b0, b1 and b2 as parameter names. Default: |
round_classes |
If |
font |
Type of font used in the plot. Default: |
gray_scale |
If |
output |
Type of output the function should return. This can either be |
Value
A data frame, a ggplot object, or a list, varying according to the "output"
argument.
Author(s)
Sollano Rabelo Braga sollanorb@gmail.com
Examples
data("exfm14")
head(exfm14)
# To get a guide curve plot for this data, we simply need to input
# dominant height and age variables, age index, and number of classes to be used:
guide_curve(exfm14, "dh", "age", 72, 5)
# if we want to get the table used to get the plot, we can choose the output "table":
guide_curve(exfm14, "dh", "age", 72, 5, output = "table")
# Other models are available for use, such as Curtis, Chapman Richards, and Bailey:
# CR and BC models are non linear, and thus need start values. There are default values,
# but they may fail, depending on the data used, so it's recommended to try start values that
# are ideal for the data used:
guide_curve(exfm14, "dh", "age", 72, 5,
model = "Chapman-Richards", start_chap = c(b0=23, b1=0.03, b2 = 1.3))
# Or, to get more information on the analysis, such as details on the regression,
# bias, rmse, plot for residuals and more (cpu taxing):
## Not run:
guide_curve(exfm14, "dh", "age", 72, 5, output = "full")
## End(Not run)