Skip to contents

Combines two distribution functions with given weights by pstrat

Usage

combineDfs(y.seq, dflist, pstrat = NULL, ...)

Arguments

y.seq

sequence of possible y values

dflist

list of distribution functions to combine

pstrat

a vector of weights to put on each distribution function; if weights are not provided then equal weight is given to each distribution function

...

additional arguments that can be past to BMisc::makeDist

Value

ecdf

Examples

x <- rnorm(100)
y <- rnorm(100, 1, 1)
Fx <- ecdf(x)
Fy <- ecdf(y)
both <- combineDfs(seq(-2, 3, 0.1), list(Fx, Fy))
plot(Fx, col = "green")
plot(Fy, col = "blue", add = TRUE)
plot(both, add = TRUE)