Description Usage Arguments Details Value
View source: R/model_logistic_data.R
An Euler discretization of the logistic growth ODE problem is used to formulate the problem as an Ordinary Least Squares regression problem. So, OLS is used to estimate the value of the logistic growth parameters, r, and optionally K if the model has not been normalized.
1 2 3 4 5 6 7 8 |
df |
A data frame; typically generated by generate_data_frame(). One column should be named "t" and numeric, and the second column should be named "P" and numeric. |
smoothing |
Nonnegative numeric; if >0 applies Tikhonov regularization to the OLS model where this value is lambda. For our purposes, this essentially forces the estimations to be smaller. |
dimensionless |
Logical; if TRUE, the model is assumed to have one parameter, r, which is estimated. If FALSE, the model is assumed to have two parameters, r and K, which are estimated. |
make_plot |
Logical; if TRUE, prints a plot of the linearized data. |
print_res |
Logical; if TRUE, the values of the estimated parameters are printed to the console. |
ts |
Numeric; the step between values of time. If not specified, this is calculated as the max time over the number of times. |
Applying Tikhonov regularization (AKA "Ridge regression") is also supported by specifying the value of the smoothing constant. Options are provided to print a plot of linearized data and print the results to the console.
A named numeric vector of parameters which were estimated.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.