Learn R Programming

analogue (version 0.4-0)

plot.mcarlo: Plotting of Monte Carlo simulated dissimilarity distributions

Description

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

Usage

## 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.

Value

  • One or more plots on the current device.

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.

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

Run this code
## continue the RLGH example from ?join
example(join)

## perform the modified method of Sawada (2004) - paired sampling,
## with replacement
swap.mcarlo <- mcarlo(swapdiat, method = "SQchord", nsamp = 10000,
                      type = "paired", replace = FALSE)
swap.mcarlo

## plot the simulated distribution
par(mfrow = c(2,1))
plot(swap.mcarlo)
par(mfrow = c(1,1))

Run the code above in your browser using DataLab