The Von Bertalanffy model. It's a kind of growth curve for a time series and takes its name from its creator, Ludwig von Bertalanffy. It is a special case of the generalized logistic function. The growth curve (biology) is used to model the average length from age in animals.
VB(
trat,
resp,
initial = NA,
sample.curve = 1000,
ylab = "Dependent",
xlab = "Independent",
theme = theme_classic(),
legend.position = "top",
r2 = "all",
error = "SE",
point = "all",
width.bar = NA,
scale = "none",
textsize = 12,
pointsize = 4.5,
linesize = 0.8,
linetype = 1,
pointshape = 21,
fillshape = "gray",
colorline = "black",
round = NA,
yname.formula = "y",
xname.formula = "x",
comment = NA,
fontfamily = "sans"
)
The function returns a list containing the coefficients and their respective values of p; statistical parameters such as AIC, BIC, pseudo-R2, RMSE (root mean square error); largest and smallest estimated value and the graph using ggplot2 with the equation automatically.
Numeric vector with dependent variable.
Numeric vector with independent variable.
Starting estimates
Provide the number of observations to simulate curvature (default is 1000)
Variable response name (Accepts the expression() function)
Treatments name (Accepts the expression() function)
ggplot2 theme (default is theme_bw())
Legend position (default is "top")
Coefficient of determination of the mean or all values (default is all)
Error bar (It can be SE - default, SD or FALSE)
Defines whether you want to plot all points ("all") or only the mean ("mean")
Bar width
Sets x scale (default is none, can be "log")
Font size
Shape size
Line size
line type
Format point (default is 21)
Fill shape
Color lines
round equation
Name of y in the equation
Name of x in the equation
Add text after equation
Font family
Gabriel Danilo Shimizu
Leandro Simoes Azeredo Goncalves
The model function for the von Bertalanffy model is: $$ y = L(1-exp(-k(t-t0)))$$
library(AgroReg)
x=seq(1,20)
y=c(0.10, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90, 0.91,
0.92, 0.94, 0.96, 0.98, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00)
VB(x,y)
Run the code above in your browser using DataLab