# generating a pair of random vectors
set.seed(2)
data1 <- rbzinb(n = 20, a0 = 1, a1 = 1, a2 = 1,
b1 = 1, b2 = 1, p1 = 0.5, p2 = 0.2,
p3 = 0.2, p4 = 0.1)
weighted.pc(xvec = data1[,1], yvec = data1[,2],
param = c(0.769, 0.041, 0.075, 3.225, 1.902, 0.5, 0.084, 1e-20, 0.416))
weighted.pc(xvec = data1[,1], yvec = data1[,2])
Run the code above in your browser using DataLab