View source: R/estimate_confidence.R
estimate_confidence | R Documentation |
estimate_confidence estimate confidence intervals for choc analysis
estimate_confidence( mychoc, method = "perm", conf = 0.95, nb_replicates = 500, ncores = 1, progressbar = TRUE )
mychoc |
a list as returned by choc |
method |
either "perm" (default) or "kern", see details |
conf |
size of the confidence interval |
nb_replicates |
number of replicates used to assess confidence intervals |
ncores |
Number of cores used. The parallelization will take place only if OpenMP is supported (default 1) |
progressbar |
(default TRUE) show progressbar (might be a bit slower) |
an updated version of mychoc with two columns added to mychoc$grid which corresponds to the bounds of the confidence interval
Two methods are available: perm permutates the kernell per time step and estimates Kendall tau on permutations. kern fits a kernell on the whole dataset (assuming that there is not time trend) and uses this overall kernell to generate surrogate data sets on which kendall tau are estimated. Permutations is a good solution when there is seasonnality within time step to preserve internal seasonality, however, it requires more time steps. kern is a good solution when there is no seasonnality within time step or when the number of observations per time step is important enough.
#retrieve results of a choc function data(res_choc) #here we put a low number of replicates to limit computation time #res_confid <- estimate_confidence(res_choc,"perm",0.95,50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.