Last chance! 50% off unlimited learning
Sale ends in
p.int(A,M,delta=50,N=-1,av="median",p.adjust.method="none")
2 * delta+1
).2 * delta+1
) used for the
generation of empirical distribution. If N is negative,
the number of samples 100 times the length of A
. M
within neighbourhood by mean or median (default)p.adjust
Pp
) and negative (Pn
) deviations of
$median/mean of \code{M}$ of the spot's neighbourhood is produced. Values corresponding to spots
within an interval of delta
at the lower or upper end of the A
-scale are set to NA
. p.int
assesses the significance of intensity-dependent bias using a permutation test.
The null hypothesis states the independence of A and M. To test if M
depends on A
,
spots are ordered with respect to A. This defines a neighbourhood of spots with similar A for each spot.
Next, the test statistic is the median or mean of M
within
a spot's intensity neighbourhood of chosen size (2 *delta+1
). The empirical distribution of the
this statistic is then generated based on N
random samples (with replacement).
(Note that sampling without replacement is used for fdr.int
. Also note, that different meaning of argument N
in p.int
and fdr.int
. The argument N
in p.int
is the number fo independent samples (of size 2 *delta+1
)
derived from the original distribution. The argument N
in fdr.int
states how many times the original distribution
is randomised and the permutated distribution is used for generating the empirical distribution.)
Comparing this empirical distribution of $median/mean of \code{M}$
with the observed distribution of $median/mean of \code{M}$,
the independence of M
and A
is assessed. If M
is independent of A
, the empirical distribution
of $median/mean of \code{M}$ can be expected to be symmetrically
distributed around its mean value. To assess the significance of observing positive deviations of
the p-values are used. It indicates the expected proportion of neighbourhoods with larger
$median/mean of \code{M}$ than the actual one based on the empirical distribution of
$median/mean of \code{M}$. The minimal p-value is set to 1/N
.
Correspondingly, the significance
of observing negative deviations of $median/mean of \code{M}$ can be determined.
Since this assessment of significance involves multiple testing, an adjustment of the p-values might be advisable.p.int2
,fdr.int
, sigint.plot
, p.adjust
# To run these examples, "un-comment" them!
#
# LOADING DATA NOT-NORMALISED
# data(sw)
# CALCULATION OF SIGNIFICANCE OF SPOT NEIGHBOURHOODS
# For this illustration, N was chosen rather small. For "real" analysis, it should be larger.
# P <- p.int(maA(sw)[,1],maM(sw)[,1],delta=50,N=10000,av="median",p.adjust.method="none")
# VISUALISATION OF RESULTS
# sigint.plot(maA(sw)[,1],maM(sw)[,1],Sp=P$Pp,Sn=P$Pn,c(-5,-5))
# LOADING NORMALISED DATA
# data(sw.olin)
# CALCULATION OF SIGNIFICANCE OF SPOT NEIGHBOURHOODS
# P <- p.int(maA(sw.olin)[,1],maM(sw.olin)[,1],delta=50,N=10000,av="median",p.adjust.method="none")
# VISUALISATION OF RESULTS
# sigint.plot(maA(sw.olin)[,1],maM(sw.olin)[,1],Sp=P$Pp,Sn=P$Pn,c(-5,-5))
Run the code above in your browser using DataLab