powered by
Combines two distribution functions with given weights by pstrat
combineDfs(y.seq, dflist, pstrat = NULL, ...)
ecdf
sequence of possible y values
list of distribution functions to combine
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
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)
Run the code above in your browser using DataLab