Closed willwerscheid closed 4 years ago
Does cdf.ash help? Or you know about that already?
On Mon, Apr 27, 2020, 18:34 Jason Willwerscheid notifications@github.com wrote:
It'd be nice to be able to plot the CDF of a mixture distribution by calling "plot" on the mixture object (i.e., plot(g)).
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/stephens999/ashr/issues/119, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANXRRIA2OUAKQ3XLV442ZDROYJBZANCNFSM4MSLCP6Q .
I was thinking methods for the unimix and normalmix classes since we use them in other packages (ebnm, flashr, etc).
I guess we have mixcdf
for those classes. Are you opposed to implementing plot
on top of that?
Looks like comp_cdf
still needs to be implemented for unimix
it's there: comp_cdf.unimix = function(m,y,lower.tail=TRUE){ vapply(y,stats::punif,m$a,min=m$a,max=m$b,lower.tail) }
Oh you're right. Not sure how I missed that. I guess you can do a one-line thing like curve(mixcdf(g, x), from = from, to = to)
, so no need for a plot
method. I will close this issue.
It'd be nice to be able to plot the CDF of a mixture distribution by calling "plot" on the mixture object (i.e.,
plot(g)
).