GrowthRates

0th

Percentile

Calculates growth rates (AGR, PGR, RGRdiff) between pairs of values in a vector

Calculates either the Absolute Growth Rate (AGR), Proportionate Growth Rate (PGR) or Relative Growth Rate (RGR) between pairs of time points, the second of which is lag positions before the first. in x.

Keywords
manip, data
Usage
AGRdiff(x, time.diffs, lag=1)
PGR(x, time.diffs, lag=1)
RGRdiff(x, time.diffs, lag=1)
Arguments
x

A numeric from which the growth rates are to be calculated.

time.diffs

a numeric giving the time differences between successive values in x.

lag

A integer specifying, for the second value in the pair to be operated on, the number positions it is ahead of the current value.

Details

The AGRdiff is calculated as the difference between a pair of values divided by the time.diffs. The PGR is calculated as the ratio of a value to a second value which is lag values ahead of the first in x and the ratio raised to the power of the reciprocal of time.diffs. The RGRdiff is calculated as the log of the PGR and so is equal to the difference between the logarithms of a pair of values divided by the time.diffs. The differences and ratios are obtained using calcLagged with lag = 1.

Value

A numeric containing the growth rates which is the same length as x and in which the first lag values NA.

See Also

intervalGRaverage, intervalGRdiff, splitContGRdiff, splitSplines, calcLagged

Aliases
  • GrowthRates
  • AGRdiff
  • PGR
  • RGRdiff
Examples
# NOT RUN {
data(exampleData)
longi.dat$Area.AGR <- with(longi.dat, AGRdiff(Area, time.diffs = Days.diffs))
# }
Documentation reproduced from package growthPheno, version 1.0-13, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.