plot.funUnif: plot PDF for sum or product of two uniform distributions...

View source: R/plot_model.R

plot.funUnifR Documentation

plot PDF for sum or product of two uniform distributions Plots a line chart for the probability density distribution (PDF) or cumulative distribution (CDF) for the sum or product of uniform distributions on positive Reals. Can handle an arbitrary number of input distributions, which must be independent, and can have different ranges.

Description

plot PDF for sum or product of two uniform distributions

Plots a line chart for the probability density distribution (PDF) or cumulative distribution (CDF) for the sum or product of uniform distributions on positive Reals. Can handle an arbitrary number of input distributions, which must be independent, and can have different ranges.

Usage

## S3 method for class 'funUnif'
plot(
  a,
  b,
  FUN = "sum",
  cumulative = F,
  buffer = 0.1,
  nZ = 500,
  show.xy.pd = F,
  line.col = c("red"),
  line.lty = c(1),
  add = F,
  xlim = NULL,
  ylim = NULL
)

Arguments

a

A numerical vector holding the minimum values of input uniform distributions.

b

A numerical vector holding the maximum values of input uniform distributions.

FUN

The function to use to determine PDF or CDF; one of 'simple', 'sum', or 'product'. If a and b are length 1 vectors, 'simple' is used.

cumulative

If TRUE, the CDF will be plotted instead of the PDF

buffer

fraction of extra, zero-probability region along x axis to plot

show.xy.pd

When FUN = 'sum' or 'product', if 'show.xy.pd' = TRUE the pdf or cdf of component distributions will be plotted along with their sum or product.

line.col

color of curve

line.lty

type of curve

add

Whether or not to the graph should be added to the existing plot. Default is FALSE.

xlim

min and max limits for the x-axis plotting area

ylim

min and max limits for the y-axis plotting area

Value

A line graph showing the PDF of the sum or product of the two input uniform distributions


JeffWeinell/misc.wrappers documentation built on Sept. 20, 2023, 12:42 p.m.