poisson_process_check: Graphical checking of Poisson process properties

Description Usage Arguments Details Value See Also Examples

View source: R/poisson_process_check_movie.R

Description

A movie to perform informal graphical checks of whether event arrival times are consistent with arising from a (one-dimensional, homogeneous) Poisson process.

Usage

1
2
poisson_process_check(user_data = NULL, total_time = NULL,
  intervals = 1, unif_bins = NULL, exp_bins = NULL)

Arguments

user_data

A numeric vector of arrival times of events.

total_time

A positive numeric scalar. The number of time units (for example hours) over which the events in user_data were recorded. Must be no smaller than the largest value in user_data.

intervals

An integer scalar. Must not be smaller than 1. The number of intervals into which to split the time interval (0, total_time) for the purposes of checking the property that the number of events that occur in an interval of fixed width has a Poisson distribution. If intervals is not an integer then it will be rounded to the nearest integer.

unif_bins

A positive integer scalar. The number of bins to use in the histogram in the "times at which events occur" described in Details. If this is not supplied then the default number of bins used in hist is used.

exp_bins

A positive integer scalar. The number of bins to use in the histogram in the "times between events" described in Details. If this is not supplied then the default number of bins used in hist is used.

Details

This movie contains two displays of plots: one plot on the top and one of three other plots on the bottom. The rate, λ say, of the supposed Poisson process is estimated by the sample mean number of events over the n_intervals, that is, length(user_data) / intervals. Let's call this estimate m.

The type of plot that appears in the bottom of the display depends on the radio click by the user. The choices are

The type of plot can be changed by clicking on the appropriate radio button.

Value

Nothing is returned, only the animation is produced.

See Also

movies: general information about the movies.

poisson_process_movie: for similar plots based on data simulated from a Poisson process.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Load package rpanel
# [Use install.packages("rpanel") if necessary]
library(rpanel)

# Data in which an event occurs exactly on the hour
## Not run: 
poisson_process_check(user_data = (1:24), 24, 24)
poisson_process_check(user_data = (1:24), 24, 24, exp_bins = 100)

## End(Not run)

paulnorthrop/stat1004 documentation built on Nov. 17, 2019, 3:49 a.m.