fitGS
is used to estimate the model parameters of a geometric series, i.e., the first term and common ratio.
fitGS(A, ini.val = NULL, control = list(), par.list = FALSE, fig.opt = TRUE)
the ascending number from 1 to length(A)
.
the observed size distribution measurements (\(y\) values) sorted in ascending order.
the predicted size distribution measurements (\(y\) values) sorted in ascending order by the geometric seires.
the observed cumulative size distribution measurements (\(z\) values) sorted in ascending order.
the predicted cumulative size distribution measurements (\(z\) values) sorted in ascending order by the geometric seires.
the estimates of the model parameters corresponding to the first term and common ratio, respectively.
the coefficient of determination between the observed and predicted \(y\) values.
the residual sum of squares between the observed and predicted \(y\) values.
the number of data points used in the data fitting.
the root mean square error between the observed and predicted \(y\) values.
the mean absolute percent error between the observed and predicted \(y\) values (in %).
the root mean square error between the observed and predicted \(z\) values.
the mean absolute percent error between the observed and predicted \(z\) values (in %).
A sequence of size distribution measurements, e.g., the temporal or spatial progression of leaf area in an individual plant.
the list of initial values for the model parameters.
the list of control parameters for using the optim
function in package stats.
an optional argument to show the list of parameters on the screen.
an optional argument to draw (i) the observed and predicted \(y\) values (size distribution measurements) sorted in ascending order, and (ii) the the observed and predicted \(z\) values (cumulative size distribution measurements) sorted in ascending order.
Peijian Shi pjshi@njfu.edu.cn, Johan Gielis johan.gielis@uantwerpen.be, Brady K. Quinn Brady.Quinn@dfo-mpo.gc.ca.
In general, there is no need to set the initial values for model parameters by users (i.e., ini.val = NULL
).
The approach proposed by Yan et al. (2025) is used to find the suitable initial values for model parameters.
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\) values (Deng et al., 2025; Yan et al. 2025).
The optim
function in package stats was used to carry out the Nelder-Mead algorithm.
fig.opt = TRUE
generates two panels (i.e., \(y\) vs. \(\hat{y}\), and \(z\) vs. \(\hat{z}\)) in a figure.
Deng, L., Wang, J., Zhang, L., Hölscher, D., Shi, P. (2025) Testing the validity of the Koyama-Smith equation and the power-law equation using 3231 tepals of a Magnolia species. Trees \(-\) Structure and Function 39, 74. tools:::Rd_expr_doi("10.1007/s00468-025-02645-7")
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., 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")
Yan, C., Shi, P., Yao, W., Yu, K., Niinemets, Ü. (2025) A nonlinear fitting method provides strong support for geometric series of stomatal area in 12 Magnoliaceae species. Plants 14, 893. tools:::Rd_expr_doi("10.3390/plants14060893")
# A sequence of tepal area measurements of a Magnolia flower (Deng et al., 2025)
A <- c(56.65, 43.37, 49.61, 56.27, 56.66, 49.45, 46.56, 43.42, 44.80)
ReS <- fitGS(A)
names( ReS)
graphics.off()
Run the code above in your browser using DataLab