View source: R/utils.jackknife.R
utils.jackknife | R Documentation |
Jackknife resampling is a statistical procedure where for a dataset of sample size n, subsamples of size n-1 are used to compute a statistic. The collection of the values obtained can be used to evaluate the variability around the point estimate. This function can take the loci, the individuals or the populations as units over which to conduct resampling.
boldNote that when n is very small, jackknife resampling is not recommended.
Parallel computation is implemented. The argument coden.cores indicates the number of core to use. If "auto" [default], it will use all but one available cores. If the number of units is small (e.g. a few populations), there is not real advantage in using parallel computation. On the other hand, if the number of units is large (e.g. thousands of loci), even with parallel computation, this function can be very slow.
utils.jackknife(
x,
FUN,
unit = "loc",
recalc = FALSE,
mono.rm = FALSE,
n.cores = "auto",
verbose = NULL,
...
)
x |
Name of the genlight object containing SNP genotypes [required]. |
FUN |
the name of the function to be used to calculate the statistic |
unit |
The unit to use for resampling. One of c("loc", "ind", "pop"): loci, individuals or populations |
recalc |
Recalculate the locus metadata statistics [default FALSE]. |
mono.rm |
Remove monomorphic loci [default FALSE]. |
n.cores |
The number of cores to use. If "auto" [default], it will use all but one available cores. |
verbose |
Verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log; 3, progress and results summary; 5, full report [default 2 or as specified using gl.set.verbosity]. |
... |
any additional arguments to be passed to FUN |
A list of length n where each element is the output of FUN
Custodian: Carlo Pacioni – Post to https://groups.google.com/d/forum/dartr
require("dartR.data")
platMod.gl <- gl.filter.allna(platypus.gl)
chk.pop <- utils.jackknife(x=platMod.gl, FUN="gl.alf", unit="pop",
recalc = FALSE, mono.rm = FALSE, n.cores = 1, verbose=0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.