PlotHistAndPareto: Plots a histogram of the data and a Pareto distribution

Description Usage Arguments Value

Description

Plots a histogram of the data with an option to fit a Pareto distribution

Usage

1
2
PlotHistAndPareto(df, var, by, pars, xlim, bin_width, fit_pareto,
  fit_color, x_lab, title, hold_axes, emp_labels, emp_lines, labels, lines)

Arguments

df

Dataframe of data

var

Column name of variable to fit Pareto distribution

by

Column name used to subset data, optional. Default is NULL.

pars

Parameters used in place of pars generated within the function. Optional. Default is NULL.

xlim

Numeric, x-value limit. Default is NULL.

bin_width

Numeric, bin size. Default is x-value range/30.

fit_pareto

Logical, whether or not to fit and show Pareto distribution. Default is TRUE.

fit_color

String, color used for Pareto fit line, quantiles, and parameter value text. Default is "orangered".

x_lab

String, x-axis label. Default is NULL.

title

String, title of plot. Default is NULL.

hold_axes

Logical, hold axes even if parameter distribution goes off of the screen. Default is TRUE.

emp_labels

Logical, whether or not to show labels for empirical data 75th and 95th quantiles. Default is TRUE.

emp_lines

Logical, whether or not to show lines for empirical data 75th and 95th quantiles. Default is TRUE.

labels

Logical, show quantile labels. Default is TRUE.

lines

Logical, show quantile lines. Default is TRUE.

Value

Plots with a Pareto distribution fitted for each 'by' factor


Blakemassey/baear documentation built on Dec. 25, 2021, 9:48 a.m.