scalogram: Function to compute a scalogram

View source: R/scalogram.R

scalogramR Documentation

Function to compute a scalogram

Description

The function decomposes the variance of a variable x on a basis of orthogonal vectors. The significance of the associated R-squared values is tested by a randomization procedure. A smoothed scalogram is obtained by summing the R-squared values into nblocks.

Usage

scalogram(
  x,
  orthobasisSp,
  nblocks = ncol(orthobasisSp),
  nrepet = 999,
  p.adjust.method = "none"
)

## S3 method for class 'scalogram'
plot(x, pos = -1, plot = TRUE, ...)

Arguments

x

a numeric vector for univariate data or an object of class dudi for multivariate data (for scalogram) or an object of class scalogram (for plot.scalogram)

orthobasisSp

an object of class orthobasisSp

nblocks

an integer indicating the number of blocks in the smoothed scalogram

nrepet

an integer indicating the number of permutations used in the randomization procedure

p.adjust.method

a string indicating a method for multiple adjustment, see p.adjust.methods for possible choices.

pos

an integer indicating the position of the environment where the data are stored, relative to the environment where the function is called. Useful only if storeData is FALSE

plot

a logical indicating if the graphics is displayed

...

additional graphical parameters (see adegpar and trellis.par.get)

Details

On the plot, oberved R-squared values are represent by bars. A black line indicate the 0.95 quantile of the values obtained by permutations. Significant values are indicated by a '*'

Value

The function scalogram returns an object of class scalogram, subclass krandtest. The plot function returns an object of class ADEgS, generated by the functions of the adegraphics package

Author(s)

Stéphane Dray stephane.dray@univ-lyon1.fr

References

Dray S., Pélissier R., Couteron P., Fortin M.J., Legendre P., Peres-Neto P.R., Bellier E., Bivand R., Blanchet F.G., De Caceres M., Dufour A.B., Heegaard E., Jombart T., Munoz F., Oksanen J., Thioulouse J., Wagner H.H. (2012). Community ecology in the age of multivariate multiscale spatial analysis. Ecological Monographs 82, 257–275.

See Also

mem orthobasis

Examples

if(require("ade4", quietly = TRUE) & require("spdep", quietly = TRUE)){
data(mafragh)
me <- mem(nb2listw(mafragh$nb))

if(require("adegraphics", quietly = TRUE)){
sc1 <- scalogram(mafragh$env$Conduc, me, nblocks = 10)
plot(sc1) 
}
}
 

adespatial documentation built on Oct. 19, 2023, 1:06 a.m.