Data-Fitting Function for the Ovate Leaf-Shape Equation
Data-Fitting Function for the Ovate Leaf-Shape Equation
fitovate is used to estimate the parameters of a simplified performance equation.
UTF-8
fitovate(expr, x, y, ini.val, par.list =FALSE, stand.fig =TRUE, control = list(), angle =NULL, fig.opt =FALSE, index.xmax =3, np =2000, xlim =NULL, ylim =NULL, unit =NULL, main =NULL)
Arguments
expr: the simplified version 1 of the performance equations.
x: the x coordinates of a polygon's boundary.
y: the y coordinates of a polygon's boundary.
ini.val: the initial values of the simplified version 1 of a performance equation.
par.list: an optional argument to show the list of parameters on the screen.
stand.fig: an optional argument to draw the observed and predicted polygons' boundaries at the standard state (i.e., the origin is located at (0, 0), and the major axis overlaps with the x-axis).
control: the list of control parameters for using the optim function in package stats.
angle: the angle between the major axis of the polygon and the x-axis, which can be defined by the user.
fig.opt: an optional argument to draw the observed and predicted polygons at an arbitrary angle between the major axis and the x-axis.
index.xmax: the specified index in parameters representing xmax.
np: the number of data points on the predicted ovate leaf-shape curve.
xlim: the range of the x-axis over which to plot the ovate leaf-shape curve.
ylim: the range of the y-axis over which to plot the ovate leaf-shape curve.
unit: the units of the x-axis and the y-axis when showing the ovate leaf-shape curve.
main: the main title of the figure.
Details
ini.val is a list for two types of parameters: three location parameters, and model parameters. This means that expr is limited to being the simplified version 1 (where xmin=0) in MbetaE, MBriereE, MLRFE, and MPerformanceE. The initial values for the first three parameters in ini.val are location parameters, among which the first two are the planar coordinates of the transferred origin, and the third is the angle between the major axis of the polygon and the x-axis. The Nelder-Mead algorithm (Nelder and Mead, 1965) is used to carry out the optimization of minimizing the residual sum of squares (RSS) between the observed and predicted y-axis. The optim function in package stats was used to carry out the Nelder-Mead algorithm. When angle = NULL, the observed polygon will be shown at its initial angle in the scanned image; when angle is a numerical value (e.g., π/4) defined by the user, it indicates that the major axis is rotated by the amount (π/4) counterclockwise from the x-axis.
Returns
par: the estimates of the model parameters.
r.sq: the coefficient of determination between the observed and predicted y values.
RSS: the residual sum of squares between the observed and predicted y values.
sample.size: the number of data points on the polygon's boundary in the data fitting.
scan.length: the observed length of the polygon's boundary.
scan.width: the observed width of the polygon's boundary.
scan.perimeter: the observed perimeter of the polygon's boundary.
scan.area: the observed area of the polygon's boundary.
pred.length: the predicted length of the polygon's boundary.
pred.width: the predicted width of the polygon's boundary.
pred.perimeter: the predicted perimeter of the polygon's boundary.
pred.area: the predicted area of the polygon's boundary.
x.stand.obs: the observed x coordinates at the standard state.
x.stand.pred: the predicted x coordinates at the standard state.
y.stand.obs: the observed y coordinates at the standard state.
y.stand.pred: the predicted y coordinates at the standard state.
x.obs: the observed x coordinates at the transferred angles defined by the user.
x.pred: the predicted x coordinates at the transferred angles defined by the user.
y.obs: the observed y coordinates at the transferred angles defined by the user.
y.pred: the predicted y coordinates at the transferred angles defined by the user.
Note
There are two types of parameters (i.e., three location parameters and model parameters) for the value of par. The transferred angle denotes the angle between the major axis and the x-axis. For the argument index.xmax, the default is 3, which corresponds to the order of the model parameter of xmax in MbetaE, MBriereE, and MLRFE. However, in MPerformanceE, index.xmax should be 4 rather than 3.
Jin, J., Quinn, B.K., Shi, P. (2022) The modified Brière equation and its applications. Plants 11, 1769. tools:::Rd_expr_doi("10.3390/plants11131769")
Huey, R.B., Stevenson, R.D. (1979) Integrating thermal physiology and ecology of ectotherms: a discussion of approaches. American Zoologist 19, 357−366. tools:::Rd_expr_doi("10.1093/icb/19.1.357")
Li, Y., Zheng, Y., Ratkowsky, D.A., Wei, H., Shi, P. (2022) Application of an ovate leaf shape model to evaluate leaf bilateral asymmetry and calculate lamina centroid location. Frontiers in Plant Science 12, 822907. tools:::Rd_expr_doi("10.3389/fpls.2021.822907")
Lian, M., Shi, P., Zhang, L., Yao, W., Gielis, J., Niklas, K.J. (2023) A generalized performance equation and its application in measuring the Gini index of leaf size inequality. Trees − Structure and Function 37, 1555−1565. tools:::Rd_expr_doi("10.1007/s00468-023-02448-8")
Nelder, J.A., Mead, R. (1965) A simplex method for function minimization. Computer Journal 7, 308−313. tools:::Rd_expr_doi("10.1093/comjnl/7.4.308")
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., Ge, F., Sun, Y., Chen, C. (2011) A simple model for describing the effect of temperature on insect developmental rate. Journal of Asia-Pacific Entomology
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")
Shi, P., Yu, K., Niklas, K.J., Schrader, J., Song, Y., Zhu, R., Li, Y., Wei, H., Ratkowsky, D.A. (2021) A general model for describing the ovate leaf shape. Symmetry 13, 1524. tools:::Rd_expr_doi("10.3390/sym13081524")