# NOT RUN {
# If x and y are integer numbers:
dbivgeo1(x = 1, y = 2, theta = c(0.2, 0.4, 0.7), log = FALSE)
# [1] 0.16128
dbivgeo2(x = 1, y = 2, theta = c(0.2, 0.4, 0.7), log = FALSE)
# [1] 0.16128
# If x is a matrix:
matr <- matrix(c(1,2,3,5), ncol = 2)
dbivgeo1(x = matr, y = NULL, theta = c(0.2,0.4,0.7), log = FALSE)
# [1] 0.0451584000 0.0007080837
dbivgeo2(x = matr, y = NULL, theta = c(0.2,0.4,0.7), log = FALSE)
# [1] 0.0451584000 0.0007080837
# If log = TRUE:
dbivgeo1(x = 1, y = 2, theta = c(0.2, 0.4, 0.7), log = TRUE)
# [1] -1.824613
dbivgeo2(x = 1, y = 2, theta = c(0.2, 0.4, 0.7), log = TRUE)
# [1] -1.824613
# }
Run the code above in your browser using DataLab