# NOT RUN {
# Generate the data set:
set.seed(123)
x1 <- rbivgeo1(n = 1000, theta = c(0.5, 0.5, 0.7))
set.seed(123)
x2 <- rbivgeo2(n = 1000, theta = c(0.5, 0.5, 0.7))
# Compute de moment estimator by:
mombivgeo(x = x1, y = NULL) # For data set x1
# [,1]
# theta1 0.5053127
# theta2 0.5151873
# theta3 0.6640406
mombivgeo(x = x2, y = NULL) # For data set x2
# [,1]
# theta1 0.4922327
# theta2 0.5001577
# theta3 0.6993893
# }
Run the code above in your browser using DataLab