bkpt_pwit {elfgen} | R Documentation |
This applies the Piecewise Iterative elfgen method. This approach uses an iterative algorithm to identify shifts in the relation between maximum richness and stream size. A user specifies a "quantile" for isolating an upper subset of the data. A user also identifies a bounding range between two x-values ("blo" = "bound low", "bhi" = "bound high") in which the upper subest of data is believed to contain a breakpoint. (Note: Small datasets may not contain a breakpoint)
bkpt_pwit(watershed.df, quantile, blo, bhi)
watershed.df |
A dataframe of sites with ecological and hydrologic data |
quantile |
Specified value for the quantile of interest - 0.95 refers to the 95th percentile |
blo |
A "bound low" value, or the lower bound of the piecewise range |
bhi |
A "bound high" value, or the upper bound of the piecewise range |
See: Lemoine, N. 2012. "R for Ecologists: Putting Together a Piecewise Regression." https://www.r-bloggers.com/r-for-ecologists-putting-together-a-piecewise-regression/ The R Book, Second Edition. Michael J. Crawley. 2013 John Wiley & Sons, Ltd. Published 2013 by John Wiley & Sons, Ltd.
Breakpoint value is returned
# We don't run this example by R CMD check, because it takes >10s
watershed.df <- elfdata(watershed.code = '0208020104', ichthy.localpath = tempdir())
bkpt_pwit(watershed.df,0.85,100,300)