plot.mcarlo: Plot Monte Carlo simulated dissimilarity distributions

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

A plot.lm-like plotting function for objects of class "mcarlo" to visualise the simulated distribution of dissimilarities.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## S3 method for class 'mcarlo'
plot(x,
     which = c(1:2),
     alpha = 0.05,
     caption = c("Distribution of dissimilarities",
       expression(paste("Simulated probability Pr (Dissim < ",
           alpha, ")"))),
     col.poly = "lightgrey",
     border.poly = "lightgrey",
     ask = prod(par("mfcol")) < length(which) &&
                                  dev.interactive(),
     ...)

Arguments

x

an object of class "mcarlo", usually the result of a call to mcarlo.

which

numeric; which of the plots should be produced?

alpha

numeric; the Monte Carlo significance level to be marked on the cumulative frequency plot.

caption

character, length 2; captions to appear above the plots.

col.poly, border.poly

character; the colour to draw the region and border of the polygon enclosing the Monte Carlo significance on the cummulative frequency plot.

ask

logical; should the function wait for user confirmation to draw each plot? If missing, the function makes a reasonable attempt to guess the current situation and act accordingly.

...

additional graphical parameters to be passed to the plotting functions. Currently ignored.

Details

The "Distribution of dissimilarities" plot produces a histogram and kernel density estimate of the distribution of simulated dissimilarity values.

The "Simulated probability" plot shows a cumulative probability function of the simulated dissimlarity values, and highlights the proportion of the curve that is less than alpha.

Value

One or more plots on the current device.

Author(s)

Gavin L. Simpson

References

Sawada, M., Viau, A.E., Vettoretti, G., Peltier, W.R. and Gajewski, K. (2004) Comparison of North-American pollen-based temperature and global lake-status with CCCma AGCM2 output at 6 ka. Quaternary Science Reviews 23, 87–108.

See Also

mcarlo

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Imbrie and Kipp example
## load the example data
data(ImbrieKipp)
data(SumSST)
data(V12.122)

## merge training and test set on columns
dat <- join(ImbrieKipp, V12.122, verbose = TRUE)

## extract the merged data sets and convert to proportions
ImbrieKipp <- dat[[1]] / 100
V12.122 <- dat[[2]] / 100

## perform the modified method of Sawada (2004) - paired sampling,
## with replacement
ik.mcarlo <- mcarlo(ImbrieKipp, method = "chord", nsamp = 1000,
                    type = "paired", replace = FALSE)
ik.mcarlo

## plot the simulated distribution
layout(matrix(1:2, ncol = 1))
plot(ik.mcarlo)
layout(1)

Example output

Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.4-3
analogue version 0.17-0

Summary:

            Rows Cols
Data set 1:   61   27
Data set 2:  110   30
Merged:      171   30


	Simulated Dissimilarities

Simulation type : paired 
No. simulations : 1000 
Coefficient     : chord 

Summary of simulated distribution:
    Min 1st Qu.  Median    Mean 3rd Qu.     Max 
 0.0917  1.3102  1.3694  1.2299  1.4052  1.4119 

Percentiles of simulated distribution:
    1%   2.5%     5%    10%    90%    95%  97.5%    99% 
0.0917 0.1035 0.1301 0.6572 1.4111 1.4115 1.4116 1.4119 

analogue documentation built on June 21, 2021, 1:08 a.m.