const_decay: exponential decay functions

View source: R/decay_functions.R

const_decayR Documentation

exponential decay functions

Description

Constant decay rate function (const_decay(), case when betas=0) e^-a*t; decaying decay rate function (decaying_decay()) e^(-(a/b)*(1-e^(-b*t))). Functions are normalized so at t=0 the function is 1.

Usage

const_decay(t, a)

decaying_decay(t, par)

Arguments

t

time (in minutes)

a

alpha (in per time, thus in per minute when time is in minutes)

par

vector of length 2 containing alpha (par[1]) and beta (par[2]) values; alpha=initial decay rate, beta=decay of decay rate (both in per time, thus in per minute when time is in minutes)

Value

returns abundance after time t at alpha initial decay rate and beta decay of decay rate relative to an initial abundance of 1

Examples

const_decay(10,log(2)/10) ## returns 0.5
decaying_decay(10,c(log(2)/10,0.01)) ##returns 0.5170495

reedssorenson/RNAdecay documentation built on Oct. 28, 2023, 11:31 a.m.