Title: | Basu-Dhar Bivariate Geometric Distribution |
---|---|
Description: | Computes the joint probability mass function (pmf), the joint cumulative function (cdf), the joint survival function (sf), the correlation coefficient, the covariance, the cross-factorial moment and generate random deviates for the Basu-Dhar bivariate geometric distribution as well the joint probability mass, cumulative and survival function assuming the presence of a cure fraction given by the standard bivariate mixture cure fraction model. The package also computes the estimators based on the method of moments. |
Authors: | Ricardo Puziol de Oliveira and Jorge Alberto Achcar |
Maintainer: | Ricardo Puziol de Oliveira <[email protected]> |
License: | GPL (>= 2) |
Version: | 2.0.1 |
Built: | 2025-02-13 03:41:06 UTC |
Source: | https://github.com/cran/BivGeo |
This function computes the cross-factorial moment for the Basu-Dhar bivariate geometric distribution assuming arbitrary parameter values.
cfbivgeo(theta)
cfbivgeo(theta)
theta |
vector (of length 3) containing values of the parameters |
The cross-factorial moment between X and Y, assuming the Basu-Dhar bivariate geometric distribution, is given by,
Note that the cross-factorial moment is always positive.
cfbivgeo
computes the cross-factorial moment for the Basu-Dhar bivariate geometric distribution for arbitrary parameter values.
Invalid arguments will return an error message.
Ricardo P. Oliveira [email protected]
Jorge Alberto Achcar [email protected]
cfbivgeo
is calculated directly from the definition.
Basu, A. P., & Dhar, S. K. (1995). Bivariate geometric distribution. Journal of Applied Statistical Science, 2, 1, 33-44.
Li, J., & Dhar, S. K. (2013). Modeling with bivariate geometric distributions. Communications in Statistics-Theory and Methods, 42, 2, 252-266.
Achcar, J. A., Davarzani, N., & Souza, R. M. (2016). Basu–Dhar bivariate geometric distribution in the presence of covariates and censored data: a Bayesian approach. Journal of Applied Statistics, 43, 9, 1636-1648.
de Oliveira, R. P., & Achcar, J. A. (2018). Basu-Dhar's bivariate geometric distribution in presence of censored data and covariates: some computational aspects. Electronic Journal of Applied Statistical Analysis, 11, 1, 108-136.
de Oliveira, R. P., Achcar, J. A., Peralta, D., & Mazucheli, J. (2018). Discrete and continuous bivariate lifetime models in presence of cure rate: a comparative study under Bayesian approach. Journal of Applied Statistics, 1-19.
cfbivgeo(theta = c(0.5, 0.5, 0.7)) # [1] 2.517483 cfbivgeo(theta = c(0.2, 0.5, 0.7)) # [1] 1.829303 cfbivgeo(theta = c(0.8, 0.9, 0.1)) # [1] 1.277864 cfbivgeo(theta = c(0.9, 0.9, 0.9)) # [1] 35.15246
cfbivgeo(theta = c(0.5, 0.5, 0.7)) # [1] 2.517483 cfbivgeo(theta = c(0.2, 0.5, 0.7)) # [1] 1.829303 cfbivgeo(theta = c(0.8, 0.9, 0.1)) # [1] 1.277864 cfbivgeo(theta = c(0.9, 0.9, 0.9)) # [1] 35.15246
This function computes the correlation coefficient analogous of the Pearson correlation coefficient for the Basu-Dhar bivariate geometric distribution assuming arbitrary parameter values.
corbivgeo(theta)
corbivgeo(theta)
theta |
vector (of length 3) containing values of the parameters |
The correlation coefficient between X and Y, assuming the Basu-Dhar bivariate geometric distribution, is given by,
Note that the correlation coefficient is always positive which implies that the Basu-Dhar bivariate geometric distribution is useful for bivariate lifetimes with positive correlation.
corbivgeo
computes the correlation coefficient analogous to the Pearson correlation coefficient for the Basu-Dhar bivariate geometric distribution for arbitrary parameter values.
Invalid arguments will return an error message.
Ricardo P. Oliveira [email protected]
Jorge Alberto Achcar [email protected]
corbivgeo
is calculated directly from the definition.
Basu, A. P., & Dhar, S. K. (1995). Bivariate geometric distribution. Journal of Applied Statistical Science, 2, 1, 33-44.
Li, J., & Dhar, S. K. (2013). Modeling with bivariate geometric distributions. Communications in Statistics-Theory and Methods, 42, 2, 252-266.
Achcar, J. A., Davarzani, N., & Souza, R. M. (2016). Basu–Dhar bivariate geometric distribution in the presence of covariates and censored data: a Bayesian approach. Journal of Applied Statistics, 43, 9, 1636-1648.
de Oliveira, R. P., & Achcar, J. A. (2018). Basu-Dhar's bivariate geometric distribution in presence of censored data and covariates: some computational aspects. Electronic Journal of Applied Statistical Analysis, 11, 1, 108-136.
de Oliveira, R. P., Achcar, J. A., Peralta, D., & Mazucheli, J. (2018). Discrete and continuous bivariate lifetime models in presence of cure rate: a comparative study under Bayesian approach. Journal of Applied Statistics, 1-19.
corbivgeo(theta = c(0.5, 0.5, 0.7)) # [1] 0.1818182 corbivgeo(theta = c(0.2, 0.5, 0.7)) # [1] 0.102009 corbivgeo(theta = c(0.8, 0.9, 0.1)) # [1] 0.822926 corbivgeo(theta = c(0.9, 0.9, 0.9)) # [1] 0.3321033
corbivgeo(theta = c(0.5, 0.5, 0.7)) # [1] 0.1818182 corbivgeo(theta = c(0.2, 0.5, 0.7)) # [1] 0.102009 corbivgeo(theta = c(0.8, 0.9, 0.1)) # [1] 0.822926 corbivgeo(theta = c(0.9, 0.9, 0.9)) # [1] 0.3321033
This function computes the covariance for the Basu-Dhar bivariate geometric distribution assuming arbitrary parameter values.
covbivgeo(theta)
covbivgeo(theta)
theta |
vector (of length 3) containing values of the parameters |
The covariance between X and Y, assuming the Basu-Dhar bivariate geometric distribution, is given by,
Note that the covariance is always positive.
covbivgeo
computes the covariance for the Basu-Dhar bivariate geometric distribution for arbitrary parameter values.
Invalid arguments will return an error message.
Ricardo P. Oliveira [email protected]
Jorge Alberto Achcar [email protected]
covbivgeo
is calculated directly from the definition.
Basu, A. P., & Dhar, S. K. (1995). Bivariate geometric distribution. Journal of Applied Statistical Science, 2, 1, 33-44.
Li, J., & Dhar, S. K. (2013). Modeling with bivariate geometric distributions. Communications in Statistics-Theory and Methods, 42, 2, 252-266.
Achcar, J. A., Davarzani, N., & Souza, R. M. (2016). Basu–Dhar bivariate geometric distribution in the presence of covariates and censored data: a Bayesian approach. Journal of Applied Statistics, 43, 9, 1636-1648.
de Oliveira, R. P., & Achcar, J. A. (2018). Basu-Dhar's bivariate geometric distribution in presence of censored data and covariates: some computational aspects. Electronic Journal of Applied Statistical Analysis, 11, 1, 108-136.
de Oliveira, R. P., Achcar, J. A., Peralta, D., & Mazucheli, J. (2018). Discrete and continuous bivariate lifetime models in presence of cure rate: a comparative study under Bayesian approach. Journal of Applied Statistics, 1-19.
covbivgeo(theta = c(0.5, 0.5, 0.7)) # [1] 0.1506186 covbivgeo(theta = c(0.2, 0.5, 0.7)) # [1] 0.04039471 covbivgeo(theta = c(0.8, 0.9, 0.1)) # [1] 0.0834061 covbivgeo(theta = c(0.9, 0.9, 0.9)) # [1] 7.451626
covbivgeo(theta = c(0.5, 0.5, 0.7)) # [1] 0.1506186 covbivgeo(theta = c(0.2, 0.5, 0.7)) # [1] 0.04039471 covbivgeo(theta = c(0.8, 0.9, 0.1)) # [1] 0.0834061 covbivgeo(theta = c(0.9, 0.9, 0.9)) # [1] 7.451626
This function computes the joint probability mass function of the Basu-Dhar bivariate geometric distribution for arbitrary parameter values.
dbivgeo1(x, y = NULL, theta, log = FALSE) dbivgeo2(x, y = NULL, theta, log = FALSE)
dbivgeo1(x, y = NULL, theta, log = FALSE) dbivgeo2(x, y = NULL, theta, log = FALSE)
x |
matrix or vector containing the data. If x is a matrix then it is considered as x the first column and y the second column (y argument need be setted to NULL). Additional columns and y are ignored. |
y |
vector containing the data of y. It is used only if x is also a vector. Vectors x and y should be of equal length. |
theta |
vector (of length 3) containing values of the parameters |
log |
logical argument for calculating the log probability or the probability function. The default value is FALSE. |
The joint probability mass function for a random vector (,
) following a Basu-Dhar bivariate geometric distribution could be written in two forms. The first form is described by:
where are positive integers and
. The second form is given by the conditions:
If X < Y, then
If X = Y, then
If X > Y, then
dbivgeo1
gives the values of the probability mass function using the first form of the joint pmf.
dbivgeo2
gives the values of the probability mass function using the second form of the joint pmf.
Invalid arguments will return an error message.
Ricardo P. Oliveira [email protected]
Jorge Alberto Achcar [email protected]
dbivgeo1
and dbivgeo2
are calculated directly from the definitions.
Basu, A. P., & Dhar, S. K. (1995). Bivariate geometric distribution. Journal of Applied Statistical Science, 2, 1, 33-44.
Li, J., & Dhar, S. K. (2013). Modeling with bivariate geometric distributions. Communications in Statistics-Theory and Methods, 42, 2, 252-266.
Achcar, J. A., Davarzani, N., & Souza, R. M. (2016). Basu–Dhar bivariate geometric distribution in the presence of covariates and censored data: a Bayesian approach. Journal of Applied Statistics, 43, 9, 1636-1648.
de Oliveira, R. P., & Achcar, J. A. (2018). Basu-Dhar's bivariate geometric distribution in presence of censored data and covariates: some computational aspects. Electronic Journal of Applied Statistical Analysis, 11, 1, 108-136.
Geometric
for the univariate geometric distribution.
# 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
# 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
This function computes the joint probability mass function of the Basu-Dhar bivariate geometric distribution assuming arbitrary parameter values in presence of cure fraction.
dbivgeocure(x, y, theta, phi11, log = FALSE)
dbivgeocure(x, y, theta, phi11, log = FALSE)
x |
matrix or vector containing the data. If x is a matrix then it is considered as x the first column and y the second column (y argument need be setted to NULL). Additional columns and y are ignored. |
y |
vector containing the data of y. It is used only if x is also a vector. Vectors x and y should be of equal length. |
theta |
vector (of length 3) containing values of the parameters |
phi11 |
real number containing the value of the cure fraction incidence parameter |
log |
logical argument for calculating the log probability or the probability function. The default value is FALSE. |
The joint probability mass function for a random vector (,
) following a Basu-Dhar bivariate geometric distribution in presence of cure fraction could be written as:
where are positive integers and
.
dbivgeocure
gives the values of the probability mass function in presence of cure fraction.
Invalid arguments will return an error message.
Ricardo P. Oliveira [email protected]
Jorge Alberto Achcar [email protected]
dbivgeocure
is calculated directly from the definition.
Basu, A. P., & Dhar, S. K. (1995). Bivariate geometric distribution. Journal of Applied Statistical Science, 2, 1, 33-44.
Achcar, J. A., Davarzani, N., & Souza, R. M. (2016). Basu–Dhar bivariate geometric distribution in the presence of covariates and censored data: a Bayesian approach. Journal of Applied Statistics, 43, 9, 1636-1648.
de Oliveira, R. P., & Achcar, J. A. (2018). Basu-Dhar's bivariate geometric distribution in presence of censored data and covariates: some computational aspects. Electronic Journal of Applied Statistical Analysis, 11, 1, 108-136.
de Oliveira, R. P., Achcar, J. A., Peralta, D., & Mazucheli, J. (2018). Discrete and continuous bivariate lifetime models in presence of cure rate: a comparative study under Bayesian approach. Journal of Applied Statistics, 1-19.
Geometric
for the univariate geometric distribution.
# If log = FALSE: dbivgeocure(x = 1, y = 2, theta = c(0.2, 0.4, 0.7), phi11 = 0.4, log = FALSE) # [1] 0.064512 # If log = TRUE: dbivgeocure(x = 1, y = 2, theta = c(0.2, 0.4, 0.7), phi11 = 0.4, log = TRUE) # [1] -2.740904
# If log = FALSE: dbivgeocure(x = 1, y = 2, theta = c(0.2, 0.4, 0.7), phi11 = 0.4, log = FALSE) # [1] 0.064512 # If log = TRUE: dbivgeocure(x = 1, y = 2, theta = c(0.2, 0.4, 0.7), phi11 = 0.4, log = TRUE) # [1] -2.740904
This function computes the estimators based on the method of the moments for each parameter of the Basu-Dhar bivariate geometric distribution.
mombivgeo(x, y)
mombivgeo(x, y)
x |
matrix or vector containing the data. If x is a matrix then it is considered as x the first column and y the second column (y argument need be setted to NULL). Additional columns and y are ignored. |
y |
vector containing the data of y. It is used only if x is also a vector. Vectors x and y should be of equal length. |
The moments estimators of of the Basu-Dhar bivariate geometric distribution are given by:
mombivgeo
gives the values of the moments estimator.
Invalid arguments will return an error message.
Ricardo P. Oliveira [email protected]
Jorge Alberto Achcar [email protected]
mombivgeo
is calculated directly from the definition.
Basu, A. P., & Dhar, S. K. (1995). Bivariate geometric distribution. Journal of Applied Statistical Science, 2, 1, 33-44.
Li, J., & Dhar, S. K. (2013). Modeling with bivariate geometric distributions. Communications in Statistics-Theory and Methods, 42, 2, 252-266.
Achcar, J. A., Davarzani, N., & Souza, R. M. (2016). Basu–Dhar bivariate geometric distribution in the presence of covariates and censored data: a Bayesian approach. Journal of Applied Statistics, 43, 9, 1636-1648.
de Oliveira, R. P., & Achcar, J. A. (2018). Basu-Dhar's bivariate geometric distribution in presence of censored data and covariates: some computational aspects. Electronic Journal of Applied Statistical Analysis, 11, 1, 108-136.
Geometric
for the univariate geometric distribution.
# 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
# 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
This function computes the joint cumulative function of the Basu-Dhar bivariate geometric distribution assuming arbitrary parameter values.
pbivgeo(x, y, theta, lower.tail = TRUE)
pbivgeo(x, y, theta, lower.tail = TRUE)
x |
matrix or vector containing the data. If x is a matrix then it is considered as x the first column and y the second column (y argument need be setted to NULL). Additional columns and y are ignored. |
y |
vector containing the data of y. It is used only if x is also a vector. Vectors x and y should be of equal length. |
theta |
vector (of length 3) containing values of the parameters |
lower.tail |
logical; If TRUE (default), probabilities are |
The joint cumulative function for a random vector (,
) following a Basu-Dhar bivariate geometric distribution could be written as:
and the joint survival function is given by:
pbivgeo
gives the values of the cumulative function.
Invalid arguments will return an error message.
Ricardo P. Oliveira [email protected]
Jorge Alberto Achcar [email protected]
pbivgeo
is calculated directly from the definition.
Basu, A. P., & Dhar, S. K. (1995). Bivariate geometric distribution. Journal of Applied Statistical Science, 2, 1, 33-44.
Li, J., & Dhar, S. K. (2013). Modeling with bivariate geometric distributions. Communications in Statistics-Theory and Methods, 42, 2, 252-266.
Achcar, J. A., Davarzani, N., & Souza, R. M. (2016). Basu–Dhar bivariate geometric distribution in the presence of covariates and censored data: a Bayesian approach. Journal of Applied Statistics, 43, 9, 1636-1648.
de Oliveira, R. P., & Achcar, J. A. (2018). Basu-Dhar's bivariate geometric distribution in presence of censored data and covariates: some computational aspects. Electronic Journal of Applied Statistical Analysis, 11, 1, 108-136.
Geometric
for the univariate geometric distribution.
# If x and y are integer numbers: pbivgeo(x = 1, y = 2, theta = c(0.2, 0.4, 0.7), lower.tail = TRUE) # [1] 0.79728 # If x is a matrix: matr <- matrix(c(1,2,3,5), ncol = 2) pbivgeo(x = matr, y = NULL, theta = c(0.2,0.4,0.7), lower.tail = TRUE) # [1] 0.8424384 0.9787478 # If lower.tail = FALSE: pbivgeo(x = 1, y = 2, theta = c(0.2, 0.4, 0.7), lower.tail = FALSE) # [1] 0.01568 matr <- matrix(c(1,2,3,5), ncol = 2) pbivgeo(x = matr, y = NULL, theta = c(0.9,0.4,0.7), lower.tail = FALSE) # [1] 0.01975680 0.00139404
# If x and y are integer numbers: pbivgeo(x = 1, y = 2, theta = c(0.2, 0.4, 0.7), lower.tail = TRUE) # [1] 0.79728 # If x is a matrix: matr <- matrix(c(1,2,3,5), ncol = 2) pbivgeo(x = matr, y = NULL, theta = c(0.2,0.4,0.7), lower.tail = TRUE) # [1] 0.8424384 0.9787478 # If lower.tail = FALSE: pbivgeo(x = 1, y = 2, theta = c(0.2, 0.4, 0.7), lower.tail = FALSE) # [1] 0.01568 matr <- matrix(c(1,2,3,5), ncol = 2) pbivgeo(x = matr, y = NULL, theta = c(0.9,0.4,0.7), lower.tail = FALSE) # [1] 0.01975680 0.00139404
This function computes the joint cumulative function of the Basu-Dhar bivariate geometric distribution assuming arbitrary parameter values in presence of cure fraction.
pbivgeocure(x, y, theta, phi, lower.tail = TRUE)
pbivgeocure(x, y, theta, phi, lower.tail = TRUE)
x |
matrix or vector containing the data. If x is a matrix then it is considered as x the first column and y the second column (y argument need be setted to NULL). Additional columns and y are ignored. |
y |
vector containing the data of y. It is used only if x is also a vector. Vectors x and y should be of equal length. |
theta |
vector (of length 3) containing values of the parameters |
phi |
vector (of length 4) containing values of the cure fraction incidence parameters |
lower.tail |
logical; If TRUE (default), probabilities are |
The joint cumulative function for a random vector (,
) following a Basu-Dhar bivariate geometric distribution in presence of cure fraction could be written as:
and the joint survival function is given by:
pbivgeocure
gives the values of the cumulative function in presence of cure fraction.
Invalid arguments will return an error message.
Ricardo P. Oliveira [email protected]
Jorge Alberto Achcar [email protected]
pbivgeocure
is calculated directly from the definition.
Basu, A. P., & Dhar, S. K. (1995). Bivariate geometric distribution. Journal of Applied Statistical Science, 2, 1, 33-44.
Achcar, J. A., Davarzani, N., & Souza, R. M. (2016). Basu–Dhar bivariate geometric distribution in the presence of covariates and censored data: a Bayesian approach. Journal of Applied Statistics, 43, 9, 1636-1648.
de Oliveira, R. P., & Achcar, J. A. (2018). Basu-Dhar's bivariate geometric distribution in presence of censored data and covariates: some computational aspects. Electronic Journal of Applied Statistical Analysis, 11, 1, 108-136.
de Oliveira, R. P., Achcar, J. A., Peralta, D., & Mazucheli, J. (2018). Discrete and continuous bivariate lifetime models in presence of cure rate: a comparative study under Bayesian approach. Journal of Applied Statistics, 1-19.
Geometric
for the univariate geometric distribution.
# If lower.tail = TRUE: pbivgeocure(x = 1, y = 2, theta = c(0.2, 0.4, 0.7), phi = c(0.2, 0.3, 0.3, 0.2), lower.tail = TRUE) # [1] 0.159456 matr <- matrix(c(1,2,3,5), ncol = 2) pbivgeocure(x=matr,y=NULL,theta=c(0.2, 0.4, 0.7),phi=c(0.2, 0.3, 0.3, 0.2),lower.tail = TRUE) # [1] 0.1684877 0.1957496 # If lower.tail = FALSE: pbivgeocure(x = 1, y = 2, theta = c(0.2, 0.4, 0.7), phi = c(0.2, 0.3, 0.3, 0.2), lower.tail = FALSE) # [1] 0.268656 matr <- matrix(c(1,2,3,5), ncol = 2) pbivgeocure(x=matr,y=NULL,theta=c(0.2, 0.4, 0.7),phi=c(0.2, 0.3, 0.3, 0.2),lower.tail = FALSE) # [1] 0.2494637 0.2064101
# If lower.tail = TRUE: pbivgeocure(x = 1, y = 2, theta = c(0.2, 0.4, 0.7), phi = c(0.2, 0.3, 0.3, 0.2), lower.tail = TRUE) # [1] 0.159456 matr <- matrix(c(1,2,3,5), ncol = 2) pbivgeocure(x=matr,y=NULL,theta=c(0.2, 0.4, 0.7),phi=c(0.2, 0.3, 0.3, 0.2),lower.tail = TRUE) # [1] 0.1684877 0.1957496 # If lower.tail = FALSE: pbivgeocure(x = 1, y = 2, theta = c(0.2, 0.4, 0.7), phi = c(0.2, 0.3, 0.3, 0.2), lower.tail = FALSE) # [1] 0.268656 matr <- matrix(c(1,2,3,5), ncol = 2) pbivgeocure(x=matr,y=NULL,theta=c(0.2, 0.4, 0.7),phi=c(0.2, 0.3, 0.3, 0.2),lower.tail = FALSE) # [1] 0.2494637 0.2064101
This function generates random values from the Basu-Dhar bivariate geometric distribution assuming arbitrary parameter values.
rbivgeo1(n, theta) rbivgeo2(n, theta)
rbivgeo1(n, theta) rbivgeo2(n, theta)
n |
number of observations. If length(n) |
theta |
vector (of length 3) containing values of the parameters |
The conditional distribution of X given Y is given by:
If X < Y, then
If X = Y, then
If X > Y, then
rbivgeo1
and rbivgeo2
generate random deviates from the Bash-Dhar bivariate geometric distribution. The length of the result is determined by n, and is the maximum of the lengths of the numerical arguments for the other functions.
Invalid arguments will return an error message.
Ricardo P. Oliveira [email protected]
Jorge Alberto Achcar [email protected]
rbivgeo1
generates random deviates using the inverse transformation method. Returns a matrix that the first column corresponds to X generated random values and the second column corresponds to Y generated random values.
rbivgeo2
generates random deviates using the shock model. Returns a matrix that the first column corresponds to X generated random values and the second column corresponds to Y generated random values. See Marshall and Olkin (1967) for more details.
Marshall, A. W., & Olkin, I. (1967). A multivariate exponential distribution. Journal of the American Statistical Association, 62, 317, 30-44.
Basu, A. P., & Dhar, S. K. (1995). Bivariate geometric distribution. Journal of Applied Statistical Science, 2, 1, 33-44.
Li, J., & Dhar, S. K. (2013). Modeling with bivariate geometric distributions. Communications in Statistics-Theory and Methods, 42, 2, 252-266.
Achcar, J. A., Davarzani, N., & Souza, R. M. (2016). Basu–Dhar bivariate geometric distribution in the presence of covariates and censored data: a Bayesian approach. Journal of Applied Statistics, 43, 9, 1636-1648.
de Oliveira, R. P., & Achcar, J. A. (2018). Basu-Dhar's bivariate geometric distribution in presence of censored data and covariates: some computational aspects. Electronic Journal of Applied Statistical Analysis, 11, 1, 108-136.
Geometric
for the univariate geometric distribution.
rbivgeo1(n = 10, theta = c(0.5, 0.5, 0.7)) # [,1] [,2] # [1,] 2 1 # [2,] 3 1 # [3,] 1 1 # [4,] 1 1 # [5,] 2 2 # [6,] 1 3 # [7,] 2 2 # [8,] 1 1 # [9,] 1 1 # [10,] 2 2 rbivgeo2(n = 10, theta = c(0.5, 0.5, 0.7)) # [,1] [,2] # [1,] 1 1 # [2,] 2 1 # [3,] 2 1 # [4,] 4 1 # [5,] 1 1 # [6,] 2 2 # [7,] 3 2 # [8,] 3 1 # [9,] 3 2 # [10,] 1 1
rbivgeo1(n = 10, theta = c(0.5, 0.5, 0.7)) # [,1] [,2] # [1,] 2 1 # [2,] 3 1 # [3,] 1 1 # [4,] 1 1 # [5,] 2 2 # [6,] 1 3 # [7,] 2 2 # [8,] 1 1 # [9,] 1 1 # [10,] 2 2 rbivgeo2(n = 10, theta = c(0.5, 0.5, 0.7)) # [,1] [,2] # [1,] 1 1 # [2,] 2 1 # [3,] 2 1 # [4,] 4 1 # [5,] 1 1 # [6,] 2 2 # [7,] 3 2 # [8,] 3 1 # [9,] 3 2 # [10,] 1 1