svrs: Single Variable Random Samples

Description Usage Arguments Value Examples

Description

Description

Usage

1
svrs(PDF, N, a, b)

Arguments

PDF

a function to be sampled from

N

number of attempted samples

a

lower bound of the support of PDF

b

upper bound of the support of PDF

Value

a dataframe of samples from PDF

Examples

1
2
3
4
5
betaPDF <- function(x) {ifelse(0<x & x<1, 2*x, 0)}
svrs(betaPDF, 100, 0, 1)

unifPDF <- function(x) {ifelse(0<x & x<1, 1, 0)}
svrs(betaPDF, 100, 0, 1)

tannerschubert/4800project documentation built on May 29, 2019, 9:52 a.m.