#Two probability distributions to combine
x1<-c(a = 0.5, b = 0.2, d = NA, e = 0, 0.3, 0.8)
x2<-c(b = 0.4, a = 0.3, e = NA, b = 0.2 , 0.13, 0.28)
z1 <- ncomb.prob(x = x1,y= x2,independent=TRUE)
z2 <- ncomb.prob(x = list(X1=x1,X2=x2),independent=FALSE)
#not yet implemented for independent=TRUE:
z3 <- ncomb.prob(x = x1,independent=FALSE,loss.type="quadratic")
z4 <- ncomb.prob(x = as.list(x1),independent=FALSE)
Run the code above in your browser using DataLab