2

I have two pdfs from generalized beta prime distributions and wish to combine them into a single pdf via convolution. Is such a thing possible in R? E.g., How can I combine the given posterior distributions Y1 and Y2 below?

require(extraDistr)
X <- seq(2,10,length.out = 100)
Y1 <- dnsbeta(x=X, shape1=10, shape2=5, min = min(X), max = max(X))
Y2 <- dnsbeta(x=X, shape1=7, shape2=4, min = min(X), max = max(X))

plot(X,Y1,type="l",ylim=c(range(Y1,Y2)))
lines(X,Y2,col="red")

If not convolution is a Monte Carlo approach better?

user111024
  • 723
  • 3
  • 15

0 Answers0