Modified Beta Equation
MbetaE
is used to calculate y y y values at given x x x values using the modified beta equation or one of its simplified versions.
UTF-8
MbetaE ( P , x , simpver = 1 )
Arguments
P
: the parameters of the modified beta equation or one of its simplified versions.
x
: the given x x x values.
simpver
: an optional argument to use the simplified version of the modified beta equation.
Details
When simpver = NULL
, the modified beta equation is selected:
\mbox i f x ∈ ( x m i n , x m a x ) , \mbox{if } x \in{\left(x_{\mathrm{min}}, \ x_{\mathrm{max}}\right)}, \mbox i f x ∈ ( x min , x max ) ,
y = y o p t [ ( x m a x − x x m a x − x o p t ) ( x − x m i n x o p t − x m i n ) x o p t − x m i n x m a x − x o p t ] δ ; y = y_{\mathrm{opt}}{ \left[\left(\frac{x_{\mathrm{max}}-x}{x_{\mathrm{max}}-x_{\mathrm{opt}}}\right)\left(\frac{x-x_{\mathrm{min}}}{x_{\mathrm{opt}}-x_{\mathrm{min}}}\right)^{\frac{x_{\mathrm{opt}}-x_{\mathrm{min}}}{x_{\mathrm{max}}-x_{\mathrm{opt}}}} \right] }^{\delta}; y = y opt ( x max − x opt x max − x ) ( x opt − x min x − x min ) x max − x opt x opt − x min δ ;
\mbox i f x ∉ ( x m i n , x m a x ) , \mbox{if } x \notin{\left(x_{\mathrm{min}}, \ x_{\mathrm{max}}\right)}, \mbox i f x ∈ / ( x min , x max ) ,
y = 0. y = 0. y = 0.
Here, x x x and y y y represent the independent and dependent variables, respectively; y o p t y_{\mathrm{opt}} y opt , x o p t x_{\mathrm{opt}} x opt , x m i n x_{\mathrm{min}} x min , x m a x x_{\mathrm{max}} x max , and δ \delta δ are constants to be estimated; y o p t y_{\mathrm{opt}} y opt represents the maximum y y y , and x o p t x_{\mathrm{opt}} x opt is the x x x value associated with the maximum y y y (i.e., y o p t y_{\mathrm{opt}} y opt ); and x m i n x_{\mathrm{min}} x min and x m a x x_{\mathrm{max}} x max represent the lower and upper intersections between the curve and the x x x -axis. y y y is defined as 0 when x < x m i n x < x_{\mathrm{min}} x < x min or x > x m a x x > x_{\mathrm{max}} x > x max . There are five elements in P
, representing the values of y o p t y_{\mathrm{opt}} y opt , x o p t x_{\mathrm{opt}} x opt , x m i n x_{\mathrm{min}} x min , x m a x x_{\mathrm{max}} x max , and δ \delta δ , respectively.
\quad When simpver = 1
, the simplified version 1 is selected:
\mbox i f x ∈ ( 0 , x m a x ) , \mbox{if } x \in{\left(0, \ x_{\mathrm{max}}\right)}, \mbox i f x ∈ ( 0 , x max ) ,
y = y o p t [ ( x m a x − x x m a x − x o p t ) ( x x o p t ) x o p t x m a x − x o p t ] δ ; y = y_{\mathrm{opt}}{ \left[\left(\frac{x_{\mathrm{max}}-x}{x_{\mathrm{max}}-x_{\mathrm{opt}}}\right)\left(\frac{x}{x_{\mathrm{opt}}}\right)^{\frac{x_{\mathrm{opt}}}{x_{\mathrm{max}}-x_{\mathrm{opt}}}} \right] }^{\delta}; y = y opt [ ( x max − x opt x max − x ) ( x opt x ) x max − x opt x opt ] δ ;
\mbox i f x ∉ ( 0 , x m a x ) , \mbox{if } x \notin{\left(0, \ x_{\mathrm{max}}\right)}, \mbox i f x ∈ / ( 0 , x max ) ,
y = 0. y = 0. y = 0.
There are four elements in P
, representing the values of y o p t y_{\mathrm{opt}} y opt , x o p t x_{\mathrm{opt}} x opt , x m a x x_{\mathrm{max}} x max , and δ \delta δ , respectively.
\quad When simpver = 2
, the simplified version 2 is selected:
\mbox i f x ∈ ( x m i n , x m a x ) , \mbox{if } x \in{\left(x_{\mathrm{min}}, \ x_{\mathrm{max}}\right)}, \mbox i f x ∈ ( x min , x max ) ,
y = y o p t ( x m a x − x x m a x − x o p t ) ( x − x m i n x o p t − x m i n ) x o p t − x m i n x m a x − x o p t ; y = y_{\mathrm{opt}}{ \left(\frac{x_{\mathrm{max}}-x}{x_{\mathrm{max}}-x_{\mathrm{opt}}}\right)\left(\frac{x-x_{\mathrm{min}}}{x_{\mathrm{opt}}-x_{\mathrm{min}}}\right)^{\frac{x_{\mathrm{opt}}-x_{\mathrm{min}}}{x_{\mathrm{max}}-x_{\mathrm{opt}}}} }; y = y opt ( x max − x opt x max − x ) ( x opt − x min x − x min ) x max − x opt x opt − x min ;
\mbox i f x ∉ ( x m i n , x m a x ) , \mbox{if } x \notin{\left(x_{\mathrm{min}}, \ x_{\mathrm{max}}\right)}, \mbox i f x ∈ / ( x min , x max ) ,
y = 0. y = 0. y = 0.
There are four elements in P
, representing the values of y o p t y_{\mathrm{opt}} y opt , x o p t x_{\mathrm{opt}} x opt , x m i n x_{\mathrm{min}} x min , and x m a x x_{\mathrm{max}} x max , respectively.
\quad When simpver = 3
, the simplified version 3 is selected:
\mbox i f x ∈ ( 0 , x m a x ) , \mbox{if } x \in{\left(0, \ x_{\mathrm{max}}\right)}, \mbox i f x ∈ ( 0 , x max ) ,
y = y o p t ( x m a x − x x m a x − x o p t ) ( x x o p t ) x o p t x m a x − x o p t ; y = y_{\mathrm{opt}}{ \left(\frac{x_{\mathrm{max}}-x}{x_{\mathrm{max}}-x_{\mathrm{opt}}}\right)\left(\frac{x}{x_{\mathrm{opt}}}\right)^{\frac{x_{\mathrm{opt}}}{x_{\mathrm{max}}-x_{\mathrm{opt}}}} }; y = y opt ( x max − x opt x max − x ) ( x opt x ) x max − x opt x opt ;
\mbox i f x ∉ ( 0 , x m a x ) , \mbox{if } x \notin{\left(0, \ x_{\mathrm{max}}\right)}, \mbox i f x ∈ / ( 0 , x max ) ,
y = 0. y = 0. y = 0.
There are three elements in P
, representing the values of y o p t y_{\mathrm{opt}} y opt , x o p t x_{\mathrm{opt}} x opt , and x m a x x_{\mathrm{max}} x max , respectively.
Returns
The y y y values predicted by the modified beta equation or one of its simplified versions.
References
Shi, P., Fan, M., Ratkowsky, D.A., Huang, J., Wu, H., Chen, L., Fang, S., Zhang, C. (2017) Comparison of two ontogenetic growth equations for animals and plants. Ecological Modelling 349, 1− - − 10. tools:::Rd_expr_doi("10.1016/j.ecolmodel.2017.01.012")
Shi, P., Gielis, J., Quinn, B.K., Niklas, K.J., Ratkowsky, D.A., Schrader, J., Ruan, H., Wang, L., Niinemets, Ü. (2022) 'biogeom': An R package for simulating and fitting natural shapes. Annals of the New York Academy of Sciences 1516, 123− - − 134. tools:::Rd_expr_doi("10.1111/nyas.14862")
Author(s)
Peijian Shi pjshi@njfu.edu.cn , Johan Gielis johan.gielis@uantwerpen.be , Brady K. Quinn Brady.Quinn@dfo-mpo.gc.ca .
Note
We have added a parameter δ \delta δ in the original beta equation (i.e., simpver = 2
) to increase the flexibility for data fitting.
See Also
areaovate
, curveovate
, fitovate
, fitsigmoid
, MBriereE
, MLRFE
, MPerformanceE
, sigmoid
Examples
x1 <- seq ( - 5 , 15 , len = 2000 )
Par1 <- c ( 3 , 3 , 10 , 2 )
y1 <- MbetaE ( P = Par1 , x = x1 , simpver = 1 )
dev.new ( )
plot ( x1 , y1 , cex.lab = 1.5 , cex.axis = 1.5 , type = "l" ,
xlab = expression ( italic ( x ) ) , ylab = expression ( italic ( y ) ) )
graphics.off ( )