evt_cdf: evt_cdf

Description Usage Arguments Details Value Examples

View source: R/evt_cdf.R

Description

Empirical versus theoretical cumulative distribution plot.

Usage

1
2
3
4
5
6
7
evt_cdf(
  n = 100,
  t = seq(0, 1, by = 0.01),
  remp = function(x) stats::runif(x),
  ptrue = function(x) stats::punif(x),
  ...
)

Arguments

n

Number of samples

t

Layout x-axis grid with a function such as t = seq(0, 1, by = .01)

remp

Take random samples from a distribution such as remp = runif(n)

ptrue

Get theoretical cumulative distribution with a function like ptrue = punif(t)

...

Add extra arguments such as plot title and axis labels

Details

Based on the OCW example: https://www.youtube.com/watch?v=8fEETchU7NM&t=1458s

Value

A plot with the empirical and true cdfs

Examples

1
2
3
evt_cdf()
evt_cdf(remp = function(x)rnorm(x),
        ptrue = function(x)pnorm(x))

mncube/simboil documentation built on Dec. 21, 2021, 8:07 p.m.