diagnose.permat {vegan}R Documentation

Plotting Methods for Matrix Permutation Algorithms


Plotting and time series extraction methods for 'permat' objects, that are useful in evaluating the performance of different null model settings, especially that of the sequential algorithms.


## S3 method for class 'permat':
plot(x, type = "bray", ylab, xlab, col, lty,
    lowess = TRUE, plot = TRUE, text = TRUE, ...)
## S3 method for class 'permat':
lines(x, type = "bray", ...)
## S3 method for class 'permat':
as.ts(x, type = "bray", ...)
## S3 method for class 'permat':


x Object of class "permat" created by the functions permatfull and permatswap.
ylab, xlab, col, lty graphical parameters for the plot method.
type Character, type of plot to be displayed: "bray" for Bray-Curtis dissimilarities, "chisq" for Chi-squared values.
lowess, plot, text Logical arguments for the plot method, whether a lowess curve should be drawn, the plot should be drawn, and statistic values should be printed on the plot.
... Other arguments passed to methods.


The plot method is useful for graphically testing for trend and independence of permuted matrices. This is especially important when using sequential algorithms ("swap", "tswap", "abuswap").

The as.ts method can be used to extract Bray-Curtis dissimilarities or Chi-squared values as time series. This can further used in testing independence (see Examples). The method as.mcmc is useful for accessing diagnostic tools available in the 'coda' package.


The plot creates a plot as a side effect.
The as.ts method returns an object of class 'ts'.


P'eter S'olymos, solymos@ualberta.ca

See Also

For functions to create 'permat' objects: permatfull, permatswap

For time-series diagnostics: Box.test, lag.plot, tsdiag, ar, arima


## Not sequential algorithm
a <- permatswap(BCI, "quasiswap")
## Sequential algorithm
b <- permatswap(BCI, "abuswap", fixedmar="col",
burnin=0, thin=100, times=50)
opar <- par(mfrow=c(2,2))
plot(a, main="Not sequential")
plot(b, main="Sequential")
plot(a, "chisq")
plot(b, "chisq")
## Extract Bray-Curtis dissimilarities
## as time series
bc <- as.ts(b)
## Lag plot
## First order autoregressive model
mar <- arima(bc, c(1,0,0))
## Ljung-Box test of residuals
## Graphical diagnostics

[Package vegan version 1.16-32 Index]