resample.ls {Davies}R Documentation

Parametric resampling from a Davies distribution

Description

Carries out parametric resampling on the null of the dataset being drawn from a Davies distribution

Usage

resample.ls(data, n = 99)

Arguments

data dataset to be resampled
n number of trials to be carried out

Details

Carries out parametric resampling. Essentially fits a Davies distribution to data, determines an error for this set of parameters, then draws n `ghost' datasets drawn from a Davies distribution with this set of optimized parameters. Comparing the original error with the distribution of `ghost' errors allows one to assess how close to a Davies distribution the original dataset (data) was.

Value

Returns as list with three components:

errors A vector of length n corresponding to the `ghost' errors
statistic Error of the original dataset from the optimal fit Davies distribution
p-value The p-value of this. Will be runif() if data is in fact drawn from a Davies distribution

Author(s)

Robin K. S. Hankin

References

W. H. Press and others, Numerical recipes: the art of scientific computing, 1989, Cambridge University Press

Examples

hist(resample.ls(rnorm(50)^2)$errors)
fit.davies.q(resample.ls(rnorm(80)^2)$errors)

[Package Davies version 0.1-4 Index]