PlotDens: Normal vs the Student

View source: R/Funs.R

PlotDensR Documentation

Normal vs the Student

Description

Plot both the Normal density and the Student density using ggplot. The plot also shows shaded areas under each density corresponding to a user-specified interval.

Usage

PlotDens(mean = 0, sd = 1, df = 1, a = -1, b = 1, output = "overlay")

Arguments

mean

mean of the Normal distribution

sd

Standard Deviation of the Normal distribution

df

Degree of freedom of the Student's t distribution

a

lower bound of the interval of the shaded area

b

upper bound of the interval of the shaded area

output

which density to plot? "norm", "t", or "overlay" (both). This latter is the default.

Value

ggplot object

Examples

PlotDens()


elghouch/DistPlot documentation built on Jan. 7, 2025, 11:26 p.m.