sampleRD | R Documentation |
sampleRD samples the randomization distribution for Fisher or paired sample test
sampleRD(x, mu = 0, NRAND = 4999)
x |
a (non-empty) numeric vector of data values. |
mu |
an scalar; it is the value of |
NRAND |
numeric; the number of randomizations (permutations). |
The procedure calculates first the sumD-statistic for the observed data,
where sumD
stands for the differences x - mu
, and mu
is
a hypothesized value for mu under a null hypothesis (usually set to 0, the
default. Then, the randomization procedure decides to change sign of each
x - mu
or not, after a coin flip. The number of coin flips are
controlled by the parameter NRAND
thus producing the randomization
distribution of sumD
differences.
The function returns a list containing the value of the sumD
statistic and the p-values of the sampled randomization distribution for the
three types of alternatives, and the number of randomizations + 1
Jorge Navarro-Alberto
Manly, B.F.J. and Navarro-Alberto, J.A. (2021) Randomization, Bootstrap and Monte Carlo Methods in Biology. 4th Edition. Chapman and Hall/ CRC Press.
RT1SAMP
data(cornheight) Dif <- cornheight[,"Cross"] - cornheight[,"Self"] Results.RD <- sampleRD(Dif)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.