bd_calc_half_life_from_peak: For each sample, calculate the time it takes for the density...

Description Usage Arguments Details Value

View source: R/bd_calc_half_life_from_peak.R

Description

For each sample, calculate the time it takes for the density to decrease by half from the peak

Usage

1
2
bd_calc_half_life_from_peak(soln, propChange = 0.5, anal = NA,
  peakRange = NA)

Arguments

soln

The result of a call to bd_do_inference

propChange

(Default 0.5) The relative decrease in density to use for the duration calculation

anal

(Optional) The result of a call to bd_analyze_soln. If not provided, it is calculated

(default

ymin to ymax) peakRange can be given so that the peak density used is on the range peakRange

Details

For each sample, calculate the time it takes for the density to decrease by half from the peak. Optionally, a different proportion can be used than the default propChange = 0.5. For example, with propChange = 0.1 the time it takes for the density to decrease by 10 not reached, the half life for the sample is set to NA. If there is no interior peak in the range peakRange, which is ymin to ymax by default, the half life is set to NA.

Value

A vector of half-lives


MichaelHoltonPrice/BayDem documentation built on Sept. 12, 2019, 9:26 p.m.