lmTE is used to estimate the parameters of the Troscianko equation using the multiple linear regression, and the estimated values of the parameters are only used as the initial values for using the fitETE function
UTF-8
lmTE(x, y, dev.angle =NULL, weights =NULL, fig.opt =TRUE, prog.opt =TRUE, xlim =NULL, ylim =NULL, unit =NULL, main =NULL)
Arguments
x: the x coordinates of the edge of an egg's boundary.
y: the y coordinates of the edge of an egg's boundary.
dev.angle: the angle of deviation for the axis associated with the maximum distance between two points on an egg's profile from the mid-line of the egg's profile.
weights: the weights for the multiple linear regression.
fig.opt: an optional argument to draw the observed and predicted egg's boundaries.
prog.opt: an optional argument to show the running progress for different values of dev.angle, when dev.angle is not NULL.
xlim: the range of the x-axis over which to plot the Troscianko curve.
ylim: the range of the y-axis over which to plot the Troscianko curve.
unit: the units of the x-axis and the y-axis when showing the Troscianko curve.
main: the main title of the figure.
Details
The estimated values of the parameters using the lmTE function tend to be NOT globally optimal, and the values are only used as the initial values for using the fitETE function. There are two methods to obtain the major axis (i.e., the mid-line) of an egg's profile: the maximum distance method, and the longest axis adjustment method. In the first method, the straight line through two points forming the maximum distance on the egg's boundary is defined as the major axis. In the second method, we assume that there is an angle of deviation for the longest axis (i.e., the axis associated with the maximum distance between two points on an egg's profile) from the mid-line of the egg's profile. That is to say, the mid-line of an egg's profile is not the axis associated with the maximum distance between two points on the egg's profile. When dev.angle = NULL, the maximum distance method is used; when dev.angle is a numerical value or a numerical vector, the longest axis adjustment method is used. Here, the numerical value of dev.angle is not the angle of deviation for the major axis of an egg's profile from the x-axis, and instead it is the angle of deviation for the longest axis (associated with the maximum distance between two points on the egg's profile) from the mid-line of the egg's profile. The planar coordinate data of an egg's profile are extracted using the protocols proposed by Shi et al. (2015, 2018) (and also see Su et al. (2019)). For the planar coordinate data extracted using the protocols of Shi et al. (2015, 2018), the data points are more regularly distributed on the egg's profile (perimeter), although the x values of the data points along the mid-line are not equidistant.
Returns
lm.te: the fitted results of the multiple linear regression.
par: the estimates of the four model parameters in the Troscianko equation.
theta: the angle between the longest axis of an egg's profile (i.e., the axis associated with the maximum distance between two points on the egg's profile) and the x-axis.
epsilon: the optimal angle of deviation for the longest axis (associated with the maximum distance between two points on an egg's profile) from the mid-line of the egg's profile, when dev.angle is not NULL.
RSS.vector: the vector of residual sum of squares corresponding to dev.angle, when dev.angle is not NULL.
x.obs: the observed x coordinates.
y.obs: the observed y coordinates.
y.pred: the predicted y coordinates corresponding to the the observed x coordinates.
x.stand.obs: the observed x coordinates when the egg length is fixed to be 2 ranging from -1 to 1.
y.stand.obs: the observed y coordinates when the egg length is fixed to be 2 ranging from -1 to 1.
y.stand.pred: the predicted y coordinates corresponding to the the observed x coordinates, when the egg length is fixed to be 2 ranging from -1 to 1.
scan.length: the length of the egg's boundary. The default is the maximum distance between two points on the egg's boundary.
scan.width: the maximum width of the egg's boundary.
scan.area: the area of the egg's boundary.
scan.perimeter: the perimeter of the egg's boundary based on all data points on the egg's boundary.
RSS.scaled: the residual sum of squares between the observed and predicted y values for a scaled egg's profile whose length equals 2.
RSS: the residual sum of squares between the observed and predicted y values.
sample.size: the number of data points used in the numerical calculation.
RMSE.scaled: the root-mean-square errors between the observed and predicted y values for a scaled egg's profile whose length equals 2.
RMSE: the root-mean-square errors between the observed and predicted y values.
Note
theta is the calculated angle between the longest axis (i.e., the axis associated with the maximum distance between two points on an egg's profile) and the x-axis, and epsilon is the calculated angle of deviation for the longest axis from the mid-line of the egg's profile. This means that the angle between the mid-line and the x-axis is equal to theta + epsilon. Here, RSS, and RMSE are for the observed and predicted y coordinates of the egg's profile, not for those when the egg's length is scaled to 2. There are two figures when fig.opt = TRUE: (i) the observed and predicted egg's boundaries when the egg's length is scaled to 2, and (ii) the observed and predicted egg's boundaries at their actual scales.
Biggins, J.D., Thompson, J.E., Birkhead, T.R. (2018) Accurately quantifying the shape of birds' eggs. Ecology and Evolution 8, 9728−9738. tools:::Rd_expr_doi("10.1002/ece3.4412")
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., Huang, J., Hui, C., Grissino-Mayer, H.D., Tardif, J., Zhai, L., Wang, F., Li, B. (2015) Capturing spiral radial growth of conifers using the superellipse to model tree-ring geometric shape. Frontiers in Plant Science 6, 856. tools:::Rd_expr_doi("10.3389/fpls.2015.00856")
Shi, P., Ratkowsky, D.A., Li, Y., Zhang, L., Lin, S., Gielis, J. (2018) General leaf-area geometric formula exists for plants - Evidence from the simplified Gielis equation. Forests 9, 714. tools:::Rd_expr_doi("10.3390/f9110714")
Shi, P., Wang, L., Quinn, B.K., Gielis, J. (2023) A new program to estimate the parameters of Preston's equation, a general formula for describing the egg shape of birds. Symmetry
Su, J., Niklas, K.J., Huang, W., Yu, X., Yang, Y., Shi, P. (2019) Lamina shape does not correlate with lamina surface area: An analysis based on the simplified Gielis equation. Global Ecology and Conservation 19, e00666. tools:::Rd_expr_doi("10.1016/j.gecco.2019.e00666")
Troscianko, J. (2014). A simple tool for calculating egg shape, volume and surface area from digital images. Ibis, 156, 874−878. tools:::Rd_expr_doi("10.1111/ibi.12177")