dfplot: Display fitted generative distribution function

Description Usage Arguments Value Author(s) See Also

View source: R/dfplot.R

Description

This function displays a one-dimensional generative distribution function fitted using dffit.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
dfplot(
  survey,
  xlab = "Observable x",
  ylab = expression("Generative distribution function" ~ phi),
  ylab.histogram = "Counts",
  xlim = NULL,
  ylim = NULL,
  log = "y",
  p = NULL,
  veff = NULL,
  xpower10 = FALSE,
  show.input.data = TRUE,
  show.posterior.data = TRUE,
  show.data.histogram = FALSE,
  show.uncertainties = TRUE,
  uncertainty.type = 1,
  show.bias.correction = FALSE,
  add = FALSE,
  scd = NULL,
  nbins = NULL,
  bin.xmin = NULL,
  bin.xmax = NULL,
  clip.xmin = NULL,
  clip.xmax = NULL,
  clip.ymin = NULL,
  clip.ymax = NULL,
  col.fit = "blue",
  lwd.fit = 2,
  lty.fit = 1,
  col.data.input = "grey",
  cex.data.input = 1,
  lwd.data.input = 1,
  col.data.posterior = "blue",
  cex.data.posterior = 1,
  lwd.data.posterior = 1,
  col.hist = "grey",
  col.ref = "black",
  lwd.ref = 1,
  lty.ref = 2,
  col.veff = "#666666",
  lwd.veff = 1.5,
  lty.veff = 3,
  col.scd = "black",
  lwd.scd = 1,
  lty.scd = 1,
  div.line = TRUE,
  axes = TRUE,
  margins = c(5.1, 4.1, 4.1, 2.1)
)

Arguments

survey

List produced by dffit

xlab

x-axis label

ylab

y-axis label

ylab.histogram

y-axis label for histogram

xlim

2-element vector with x-axis plotting limits

ylim

2-element vector with y-axis plotting limits

log

String specifying the log-axes as in plot.

p

Parameters of a reference distribution function do be over-plotted to the fitted function. Choose NULL to avoid plotting a reference function.

veff

Function of x to be plotted over the histogram, if show.data.histogram = TRUE.

xpower10

If TRUE, the model argument x is elevated to the power of 10 in the plots.

show.input.data

If TRUE, the input data is shown in bins. Each bin values is simply the sum 1/Veff(x) of the observed x-values in this bin.

show.posterior.data

If TRUE, the posterior data, constructucted from all the individual posterior PDFs of the observed data, are snown in bins. Note that posterior data only exists of the fitted data is uncertain, e.g. if the argument x.err in dffit was non-zero.

show.data.histogram

If TRUE, a histogram of source counts, based on the input data, is displayed in a bottom panel. Choose NA, to leave space for the histogram without drawing it.

show.uncertainties

If TRUE, uncertainties are displayed around the best fit model.

uncertainty.type

1: plot Gaussian 1-sigma uncertanties propagated from the Hessian matrix of the likelihood. 2: plot 68 percentile region (from 16 to 84 percent). 3 plot 68 (16 to 84) and 95 (2 to 98) percentile regions.

show.bias.correction

If TRUE, the bias corrected MLE is shown instead of the native ML parameters.

add

If TRUE, the lines are overplotted on the currently open plot.

scd

is an optional N-vector or scalar function specifying a source count density to be plotted over the histogram.

nbins

Number of bins to be plotted; must be larger than 0. Choose nbins=NULL (default) to determine the number of bins automatically.

bin.xmin

Left edge of first bin

bin.xmax

Right edge of last bin

clip.xmin

Minimum x values to be plotted in models

clip.xmax

Maximum x values to be plotted in models

clip.ymin

Minimum y values to be plotted in models

clip.ymax

Maximum y values to be plotted in models

col.fit

Color of fit (see plot)

lwd.fit

Line width of fit (see plot)

lty.fit

Line type of fit (see plot)

col.data.input

Color of binned input data

cex.data.input

Size of binned input data

lwd.data.input

Line width of binned input data

col.data.posterior

Color of binned posterior data

cex.data.posterior

Size of binned posterior data

lwd.data.posterior

Line width of binned posterior data

col.hist

Color of source count histogram

col.ref

Color of reference distribution function

lwd.ref

Line width of reference distribution function

lty.ref

Line type of reference distribution function

col.veff

Color of reference function veff

lwd.veff

Line width of reference function veff

lty.veff

Line type of reference function veff

col.scd

Color of source count density function scd

lwd.scd

Line width of source count density function scd

lty.scd

Line type of source count density function scd

div.line

Logical flag specifying if the division line between upper and lower p

axes

Logical flag specifying whether to plot axes

margins

Margins (bottom,left,top,right)

Value

Returns the input list survey with the additional sub-list survey$bin that contains the binned data.

Author(s)

Danail Obreschkow

See Also

For optimized plotting of galaxy mass functions, use the derived function mfplot. As an example run dfexample(1). See examples in dffit.


obreschkow/dftools documentation built on June 25, 2021, 10:45 p.m.