PlotHistAndWrappedCauchy: Plots a histogram with a wrapped Cauchy distribution

Description Usage Arguments Details Value

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
PlotHistAndWrappedCauchy(
  df,
  var,
  by = NULL,
  pars = NULL,
  bin_width = NULL,
  fit_wrapped_cauchy = TRUE,
  fit_color = "black",
  x_lab = NULL,
  title = NULL
)

Arguments

df

Dataframe of data

var

Column name of variable to fit wrapped Cauchy distribution

by

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

pars

A set of parameters used in place of pars generated within the functions, optional. Default is NULL.

bin_width

Numeric, bin size. Default is 15 degrees or 2*pi/24 radians.

fit_wrapped_cauchy

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

fit_color

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

x_lab

String, name for x-axis. Default is 'var'.

title

String, name for title.

Details

Usage: PlotHistAndWrappedCauchy(df, var, by, pars, bin_width, fit_wrapped_cauchy, fit_color, x_lab, title)

Automatically adjusts plot for degrees or radians input, but all parameter estimates are based on radians.

Value

A plot of the data with a fitted wrapped Cauchy distribution.


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