View source: R/sar_threshold.R
threshold_ci | R Documentation |
Generate confidence intervals around the breakpoints of the one-threshold continuous and left-horizontal models. Two types of confidence interval can be implemented: a confidence interval derived from an inverted F test and an empirical bootstrap confidence interval.
threshold_ci(object, cl = 0.95, method = "boot", interval = NULL,
Nboot = 100, verb = TRUE)
object |
An object of class 'thresholds', generated using the
|
cl |
The confidence level. Default value is 0.95 (95 percent). |
method |
Either bootstraping ( |
interval |
The amount to increment the threshold value by in the
iterative model fitting process used in both the F and boot methods. The
default for non-transformed area reverts to 1, while for log-transformed
area it is 0.01. It is advised that the same interval value used when
running |
Nboot |
Number of bootstrap samples (for use with |
verb |
Should progress be reported. If |
Full details of the two approaches can be found in Toms and Lesperance (2003). If the number of bootstrap samples is large, the function can take a while to run. Following Toms and Lesperance (2003), we therefore recommend the use of the inverted F test confidence interval when sample size is large, and bootstrapped confidence intervals when sample size is smaller.
Currently only available for the one-threshold continuous and left- horizontal threshold models.
A list of class "sars" with two elements. If method “F” is used, the list contains only the confidence interval values. If method “boot” is used, the list contains two elements. The first element is the full set of bootstrapped breakpoint estimates for each model and the second contains the confidence interval values.
Francois Rigal and Christian Paroissin
Toms, J.D. & Lesperance, M.L. (2003) Piecewise regression: a tool for identifying ecological thresholds. Ecology, 84, 2034-2041.
data(aegean2)
a2 <- aegean2[1:168,]
fitT <- sar_threshold(data = a2, mod = "ContOne",
interval = 0.1, non_th_models = TRUE, logAxes = "area", logT = log10)
#calculate confidence intervals using bootstrapping
#(very low Nboot just as an example)
CI <- threshold_ci(fitT, method = "boot", interval = NULL, Nboot = 3)
CI
#Use the F method instead, with 90% confidence interval
CI2 <- threshold_ci(fitT, cl = 0.90, method = "F", interval = NULL)
CI2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.