pdfplots: Plot fitted population pdfs

View source: R/pdfplots.R

pdfplotsR Documentation

Plot fitted population pdfs

Description

Plot fitted population pdfs at combinations of two different values of the population mean and variance.

Usage

pdfplots(
  medianfit,
  precisionfit,
  alpha = 0.05,
  tails = 0.05,
  lower = NA,
  upper = NA,
  n.x = 100,
  d = "best",
  fontsize = 18
)

Arguments

medianfit

The output of a fitdist command following elicitation of the expert's beliefs about the population median.

precisionfit

The output of a fitdist command following elicitation of the expert's beliefs about the population precision.

alpha

Value between 0 and 1 to determine choice of means and variances used in plots

tails

Value between 0 and 1 to determine the tail area shown in the pdf plots

lower

lower limit on the x-axis for plotting.

upper

upper limit on the x-axis for plotting.

n.x

The number of points on the x-axis at which the pdf is plotted.

d

The fitted distribution for the population median. Can be one of "normal", "lognormal" or "best", where "best" will select the best fitting out of normal and lognormal.

fontsize

Font size used in the plots.

Details

Four pdfs are plotted, using each combination of the alpha/2 and 1-alpha/2 quantiles of the fitted distributions for the population median and standard deviation

Value

A plot and a list, containing

mu

The two population mean values used in the plots.

sigma

The two population standard deviation values used in the plots.

References

multiplot function obtained from http://www.cookbook-r.com/Graphs/Multiple_graphs_on_one_page_(ggplot2)/

Examples

## Not run: 
prfit <- fitprecision(interval = c(60, 70), propvals = c(0.2, 0.4), trans = "log")
medianfit <- fitdist(vals = c(50, 60, 70), probs = c(0.05, 0.5,  0.95), lower = 0)
pdfplots(medianfit, prfit, alpha = 0.01)
 
## End(Not run)

SHELF documentation built on Sept. 11, 2024, 6:54 p.m.