Type: | Package |
Title: | Growth Models |
Version: | 0.1.0 |
Imports: | stats |
Description: | A model for the growth of self-limiting populations using three, four, or five parameter functions, which have wide applications in a variety of fields. The dependent variable in a dynamical modeling could be the population size at time x, where x is the independent variable. In the analysis of quantitative polymerase chain reaction (qPCR), the dependent variable would be the fluorescence intensity and the independent variable the cycle number. This package then would calculate the TWW cycle threshold. |
License: | GPL-3 |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.2 |
Config/testthat/edition: | 3 |
NeedsCompilation: | no |
Packaged: | 2024-11-20 17:26:12 UTC; dwilus |
Author: | Mohammad Tabatabai [aut], Derek Wilus [aut, cre] |
Maintainer: | Derek Wilus <dwilus@mmc.edu> |
Repository: | CRAN |
Date/Publication: | 2024-11-20 17:40:07 UTC |
TWW Growth Model
Description
Calculates the 3-, 4-, and 5-parameter TWW (Tabatabai, Wilus, Wallace) Growth
model estimates. For those who use the cycle number and fluorescence intensity to analyze
real-time, or quantitative polymerase chain reaction (qPCR), this function will calculate
the TWW cycle threshold (C_{TWW}
).
Usage
tww(x, y, start = list(alpha,theta,beta,delta = NULL,phi = NULL), ...)
Arguments
x |
A numeric vector that must be same length as |
y |
A numeric vector that must be same length as |
start |
A numeric list.
The supplied list of numbers are designated as starting parameters, or initial conditions,
inserted into the nls function as |
... |
Additional optional arguments passed to the nls function. |
Details
The initialized parameters are inserted as a list in start
and are passed to the nls function using the Gauss-Newton algorithm.
If you intend to use a 3-parameter model, insert values for \alpha
, \theta
, and \beta
only. If you plan to use the
4-parameter model, you must insert values for \delta
in addition to \alpha
, \theta
, and \beta
.
If you intend to use the 5-parameter model, you need to insert initial values for all five parameters. The parameters always follows the
order \alpha
, \theta
, \beta
, \delta
, and \phi
. The number of items in the list
determines your choice of model.
The 3-parameter growth model has the form
F(x)=\alpha\ e^{-ArcSinh\left(\theta e^{-\beta x}\right)}
while the 4-parameter growth model follows the equation
F(x)=\alpha\ e^{-ArcSinh\left(\theta e^{-\beta x}\right)}+\delta
and the 5-parameter growth model is given by
F(x)=\alpha\ e^{-\phi ArcSinh\left(\theta e^{-\beta x}\right)}+\delta
In each of these models, \theta
> 0. In the 5-parameter model, \phi
> 0.
C_{TWW}
is only applicable to qPCR data and should not be considered in other cases.
Value
This function is designed to calculate the parameter estimates, standard errors, and p-values
for the TWW Growth (Decay) Model as well as estimating C_{TWW}
, inflection point (poi) coordinates,
sum of squares error (SSE), total sum of squares (SST), root mean square error (RMSE),
Akaike information criterion (AIC), and Bayesian information criterion (BIC).
References
Tabatabai M, Wilus D, Singh K, Wallace T. The TWW Growth Model and Its Application in the Analysis of Quantitative Polymerase Chain Reaction. Bioinformatics and Biology Insights. 2024;18. doi:10.1177/11779322241290126
See Also
nls
to determine the nonlinear (weighted) least-squares estimates of the parameters of a nonlinear model.
Examples
#Data source: Guescini, M et al. BMC Bioinformatics (2008) Vol 9 Pg 326
fluorescence <- c(-0.094311625, -0.022077977, -0.018940959, -0.013167045,
0.007782761, 0.046403221, 0.112927418, 0.236954113,
0.479738750, 0.938835708, 1.821600610, 3.451747880,
6.381471101, 11.318606976, 18.669664284, 27.684433343,
36.269197588, 42.479513622, 46.054327283, 47.977882896,
49.141536806, 49.828324910, 50.280629676, 50.552338600,
50.731472869, 50.833299572, 50.869115345, 50.895051731,
50.904097158, 50.890804989, 50.895911798, 50.904685027,
50.899942221, 50.876866864, 50.878926417, 50.876938783,
50.857835844, 50.858580957, 50.854100495, 50.847128383,
50.844847982, 50.851447716, 50.841698121, 50.840564351,
50.826118614, 50.828983069, 50.827490974, 50.820366077,
50.823743224, 50.857581865)
cycle_number <- 1:50
#3-parameter model
tww(x = cycle_number, y = fluorescence, start = list(40,15.5,0.05))
#4-parameter model
tww(x = cycle_number, y = fluorescence, start = list(40,15.5,0.05,0),
algorithm = "port")$c_tww
#5-parameter model
summary(tww(x = cycle_number, y = fluorescence, start = list(40,15.5,0.05,0,1),
algorithm = "port",
control = nls.control(maxiter = 250)))