Description Usage Arguments Details Value Author(s) Examples
A permutation based non-parametric trend testing
1 |
x |
a numeric vector containing values |
g |
an ordered factor or integer vector containing the groups |
wt |
a numeric vector the probability weight for data point |
id |
a factor that associates individuals to data points (see details) |
B |
the number of permutations |
normalize.wts |
whether the weights should be normalized to 1.0 for data points associated with single |
alternative |
whether the trend is increasing, decreasing or changing into any direction |
grouping |
determines the way how permutation takes |
The null hypothesis of a equality between the groups g
concerning the values x
is tested.
The permutation test implented here is based upon the regular Jonckheere Terpstra test, but incorporates
weights wt
and the possiblity group data points by individuals id
. When data points are grouped by
individuals, either the x values (grouping == "by.groups"
) or the groups (by.values
) are randomized
by the permutation process. if grouping == "none"
is selected, the permutation test will randomize both.
In all cases, the weights (wt
) remain unrandomized.
The weighted Jonckheere Terpstra statistic JT is calculated for n data points
JT = ∑_{i=1}^n ∑{j=1}^n w_i w_j U_{ij}
with i ≤q n and j ≤q n and i, j, n \in \mathcal{N}, weights w, values x and groups g.
U_{ij} = \begin{cases} 1 \mbox{if } g_i < g_j \mbox{and} x_i < x_j \\ 0.5 \mbox{if } g_i < g_j \mbox{and} x_i = x_j \end{cases}
In case of all weights identical to 1, this statistic is equal to the classical JT statistic.
The plot method for this function provides an easy overview of the permutation samples.
An object of class weighted_jt_statistic
, basically a list including elements
statistic |
the reference Jonckheere Terpstra statistic |
permutations |
a vector of Jonckheere Terpstra statistics of permutations |
alternative |
the test setting - as determined by input parameters |
mean.permutation |
the mean of Jonckheere Terpstra statistics of permutations |
std.permutation |
the standard deviation of Jonckheere Terpstra statistics of permutations |
n.permutations |
the number of permutations - as determined by input parameters |
est.p.value |
the p value determined from a normal distribution approximated from permutations |
exact.p.value |
the p value determined from the permutated samples |
Andreas Recke
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.