Convert PDF to CDF for a Weibull mixture model


I have the following code to plot probability density for a Weibull mixture model (of two Weibull distributions). I'd like to plot cummulative density and also print calculation output based on the above probability density result. Could anyone help me code it?

x = rmixweibull(200, c(0.7, 0.3), c(27.7, 55.8), c(5.9, 20.5))
def1_weibull = mixfit(x, family = 'weibull', ncomp = 2); def1_weibull
plot(def1_weibull) #plot PDF
d1 = density(def1_weibull)
d2 = density(def1_weibull, at = 0)
print(d1) #generates PDF calculation output

Thank you very much for your time!

You just have to put the d1 and d2 into plot() for the density to be plotted.

Thanks for your advice!
Sorry, but I don’t think I understood you advice. Do you mean “plot (d1, d2)” will give me a figure as well as print the values for cumulative density???

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.