statistics - Combining two Weibull distributions in R -


i working on project involves combining 2 weibull distributions , creating double peaked curve. aim make predictions using this. have searched online , can't seem find on or if r has function allows me combine 2 weibulls. below shows code have used create 2 weibull distributions wish combine make 1 single probability density function.

curve(dweibull(x, scale=30.59898985, shape=2.27136646),from=0, to=70, main="weibull distribution") curve(dweibull(x, scale=19.39743639, shape=1.22800332),from=0, to=70, main="weibull distribution") 

any amazing.

thanks!

would make sense combine probability distributions , use element "y" of final list make predictions? if so, should work. final auc still ~1.

dwb1 <- curve(dweibull(x, scale=30.59898985, shape=2.27136646),from=0, to=70, main="weibull distribution") dwb2 <- curve(dweibull(x, scale=19.39743639, shape=1.22800332),from=0, to=70, main="weibull distribution")  # combine final.dwb <- lapply(c("x", "y"), (function(i){   (dwb1[[i]] + dwb2[[i]])/2 })) names(final.dwb) <- c("x", "y")  # plot plot(final.dwb$y ~ final.dwb$x, xlim=c(0,70), main = "combined weibull distributions", type = "n", las = 2) lines(final.dwb$y ~ final.dwb$x, xlim=c(0,70), main = "combined weibull distributions") 

combined distribution plot

say want probability @ time of interest

t1 = 30 

search among x have , find closest t1 , return corresponding y

id <- which.min(abs(t1 - final.dwb$x)) final.dwb$y[id] 

Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -