p.spatial2 {OLIN} | R Documentation

## Assessment of the significance of spatial bias based on p-values

### Description

This function assesses the significance of spatial bias. This is achieved by comparing the observed average values of logged fold-changes within a spot's spatial neighbourhood with an empirical distribution generated by permutation tests. The significance is given by (adjusted) p-values derived in one-sided permutation test.

### Usage

    p.spatial2(object,delta=2,N=-1,av="median",p.adjust.method="none")

### Arguments

`object` | object of class marrayRaw or marrayNorm
`delta` | integer determining the size of spot neighbourhoods (`(2*delta+1)x(2*delta+1)`).
`N` | number of samples for generation of empirical background distribution
`av` | averaging of `M` within neighbourhood by mean or median (default)
`p.adjust.method` | method for adjusting p-values due to multiple testing regime. The available methods are “none”, “bonferroni”, “holm”, “hochberg”, “hommel” and “fdr”. See also `p.adjust`.

### Details

The function `p.spatial2.Rd` is basically the same as `p.spatial`, but differs in its input and output formats. Details about the functionality can be found at `p.spatial`.

### Value

A list of a two lists of vectors is produced containing the p-values for positive (`Pp`) and negative (`Pn`) deviations of median/mean of \code{M} of the spot's neighbourhood is produced (see example below).

### Note

This function will be fused with `p.spatial` in future versions using S4-style methods.

### Author(s)

Matthias E. Futschik (http://itb.biologie.hu-berlin.de/~futschik)

### See Also

`fdr.int`, `sigxy.plot`, `p.adjust`,`p.spatial`

### Examples

    # To run these examples, "un-comment" them!
    #
    # LOADING DATA
    # 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.spatial2(sw,delta=2,N=10000,av="median")
    # SIGNIFICANCE PLOTS OF ARRAY 1
    # sigxy.plot2(sw[,1],P$Pp[[1]],P$Pn[[1]],color.lim=c(-5,5),main="P-value")
    # SIGNIFICANCE PLOTS OF ARRAY 3
    # sigxy.plot2(sw[,3],P$Pp[[3]],P$Pn[[3]],color.lim=c(-5,5),main="P-value")

[Package OLIN version 1.68.0 Index]