fitGS | R Documentation |
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)
A |
A sequence of size distribution measurements, e.g., the temporal or spatial progression of leaf area in an individual plant. |
ini.val |
the list of initial values for the model parameters. |
control |
the list of control parameters for using the |
par.list |
an optional argument to show the list of parameters on the screen. |
fig.opt |
an optional argument to draw (i) the observed and predicted |
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.
x |
the ascending number from 1 to |
y |
the observed size distribution measurements ( |
y.theo |
the predicted size distribution measurements ( |
z |
the observed cumulative size distribution measurements ( |
z.theo |
the predicted cumulative size distribution measurements ( |
par |
the estimates of the model parameters corresponding to the first term and common ratio, respectively. |
r.sq |
the coefficient of determination between the observed and predicted |
RSS |
the residual sum of squares between the observed and predicted |
sample.size |
the number of data points used in the data fitting. |
RMSE1 |
the root mean square error between the observed and predicted |
MAPE1 |
the mean absolute percent error between the observed and predicted |
RMSE2 |
the root mean square error between the observed and predicted |
MAPE2 |
the mean absolute percent error between the observed and predicted |
In the outputs, the parameter vector par
was estimated based on the observed
and predicted y
values rather than the observed and predicted z
values.
Peijian Shi pjshi@njfu.edu.cn, Johan Gielis johan.gielis@uantwerpen.be, Brady K. Quinn Brady.Quinn@dfo-mpo.gc.ca.
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. \Sexpr[results=rd]{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. \Sexpr[results=rd]{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. \Sexpr[results=rd]{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. \Sexpr[results=rd]{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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.