plotting.distributions: Plotting the observed test statistic on the distribution of...

View source: R/plotting.distributions.R

plotting.distributionsR Documentation

Plotting the observed test statistic on the distribution of the test statistic calculated on simulated data

Description

This function is used by other functions and will generally not be used directly by users. Can be used to plot test statistics on simulated data generated by other functions (e.g. slope.test.stasis, auto.corr.test.trend, runs.test.RW).

Usage

plotting.distributions(sim.data, obs, test, xlab, main)

Arguments

sim.data

vector containing test statistics calculated from the simulated data

obs

the test statistic calculated from the observed data

test

the test that has been applied (runs.test, slope.test, auto.corr, net.change.test)

xlab

label for x-axis

main

plot label

Details

This function is used by other functions and will generally not be used directly by users. Can be used to plot test statistics on simulated data generated by other functions (e.g. slope.test.stasis, auto.corr.test.trend, runs.test.RW).

Value

Histogram of test statistics calculated from simulated data. The test statistic calculated from the observed data is indicated by a vertical broken line.

Author(s)

Kjetil L. Voje

See Also

fit3adequacy.trend, auto.corr.test.RW, auto.corr.test.stasis

Examples

## generate a paleoTS objects by simulating a directional trend
x <- sim.GRW(ns=40, ms=0.5, vs=0.1)

## run the test
for.plotting<-auto.corr.test.trend(x,mstep,vstep)

## plot
plotting.distributions(for.plotting$replicates, for.plotting$summary[1], test="auto.corr")


klvoje/adePEM documentation built on Feb. 24, 2023, 1:28 p.m.