combineDfs | R Documentation |
Combines two distribution functions with given weights by pstrat
combineDfs(y.seq, dflist, pstrat = NULL, ...)
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 |
ecdf
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.