Type: | Package |
Title: | Bivariate Pareto Distribution |
Version: | 1.0.0 |
Date: | 2023-08-07 |
Maintainer: | Biplab Paul <paul.biplab497@gmail.com> |
Description: | Implements the EM algorithm with one-step Gradient Descent method to estimate the parameters of the Block-Basu bivariate Pareto distribution with location and scale. We also found parametric bootstrap and asymptotic confidence intervals based on the observed Fisher information of scale and shape parameters, and exact confidence intervals for location parameters. Details are in Biplab Paul and Arabin Kumar Dey (2023) <doi:10.48550/arXiv.1608.02199> "An EM algorithm for absolutely continuous Marshall-Olkin bivariate Pareto distribution with location and scale"; E L Lehmann and George Casella (1998) <doi:10.1007/b98854> "Theory of Point Estimation"; Bradley Efron and R J Tibshirani (1994) <doi:10.1201/9780429246593> "An Introduction to the Bootstrap"; A P Dempster, N M Laird and D B Rubin (1977) <www.jstor.org/stable/2984875> "Maximum Likelihood from Incomplete Data via the EM Algorithm". |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
Imports: | numDeriv, stats |
RoxygenNote: | 7.2.3 |
Author: | Biplab Paul [aut, cre], Arabin Kumar Dey [aut] |
Encoding: | UTF-8 |
LazyData: | true |
NeedsCompilation: | no |
Packaged: | 2023-08-07 19:29:00 UTC; GOBINDO |
Depends: | R (≥ 3.5.0) |
Repository: | CRAN |
Date/Publication: | 2023-08-08 14:50:02 UTC |
Bivariate Pareto Distribution
Description
Implements the EM algorithm with one-step Gradient Descent method to estimate the parameters of the Block-Basu bivariate Pareto distribution with location and scale. We also found parametric bootstrap and asymptotic confidence intervals based on the observed Fisher information scale, shape parameters, and exact confidence intervals for location parameters.
Author(s)
Biplab Paul <paul.biplab497@gmail.com> and Arabin Kumar Dey <arabin@iitg.ac.in>
References
Biplab Paul and Arabin Kumar Dey (2023). An EM algorithm for absolutely continuous Marshall-Olkin bivariate Pareto distribution with location and scale, Preprint.
E L Lehmann and George Casella (1998). Theory of Point Estimation, Springer, New York, doi.org/10.1007/b98854.
Bradley Efron and R J Tibshirani (1994). An Introduction to the Bootstrap, CRC press, New York, doi.org/10.1201/9780429246593.
A P Dempster, N M Laird and D B Rubin (1977). Maximum Likelihood from Incomplete Data via the EM Algorithm, Journal of the royal statistical society: series B (methodological), www.jstor.org/stable/2984875.
Observed Fisher information based confidence interval of Block-Basu Bivariate Pareto (BBBVPA) distribution
Description
Observed Fisher information based confidence interval of Bivariate BBBVPA distribution.
Usage
conf.intv(
object,
conf.lev = 0.95,
tol = 1e-04,
intv.m1 = c(0, 2),
intv.m2 = c(0, 2)
)
Arguments
object |
|
conf.lev |
confidence level, |
tol |
convergence tolerance for confidence intervals, |
intv.m1 |
interval related to confidence interval of |
intv.m2 |
interval related to confidence interval of |
Value
A matrix of lower and upper confidence interval limits (in the first and second column respectively). The matrix rows are labeled by the parameter names (if any) and columns by the corresponding distribution quantiles.
Author(s)
Biplab Paul <paul.biplab497@gmail.com> and Arabin Kumar Dey <arabin@iitg.ac.in>
Examples
# see the example of estimation
Observed Fisher information based confidence interval of 3-parameter Block-Basu Bivariate Pareto (BBBVPA) distribution
Description
Observed Fisher information based confidence interval of 3-parameter BBBVPA distribution.
Usage
conf.intv3(object, conf.lev = 0.95, tol = 1e-04)
Arguments
object |
|
conf.lev |
confidence level, |
tol |
convergence tolerance for confidence intervals, |
Value
A matrix of lower and upper confidence interval limits (in the first and second column respectively). The matrix rows are labeled by the parameter names (if any) and columns by the corresponding distribution quantiles.
Author(s)
Biplab Paul <paul.biplab497@gmail.com> and Arabin Kumar Dey <arabin@iitg.ac.in>
Examples
dat <- rbb.bvpa(500, 0, 0, 1.0, 1.0, 2.0, 0.4, 0.5)
conf.intv3(estimates3(dat, 2.4, 0.3, 0.6))
Estimation of Block-Basu Bivariate Pareto (BBBVPA) distribution
Description
Parameters estimation of BBBVPA distribution.
Usage
estimates(
I,
s1.int,
s2.int,
a0.int,
a1.int,
a2.int,
tol.est = 1e-05,
MxIter.no = 2000,
rate = 1e-04,
condition = "log.L"
)
Arguments
I |
bivariate observations. |
s1.int |
initial choice of |
s2.int |
initial choice of |
a0.int |
initial choice of |
a1.int |
initial choice of |
a2.int |
initial choice of |
tol.est |
convergence tolerance, |
MxIter.no |
maximum number of iterations, |
rate |
step size or learning rate for gradient descent, |
condition |
convergence criterion, |
Value
object of class "bbbvpa
", a list consisting of
mu1 , mu2 , sigma1 , sigma2 , alpha0 , alpha1 , alpha2 , iter.no |
estimates of parameters and number of iteration. |
data |
the supplied data |
Author(s)
Biplab Paul <paul.biplab497@gmail.com> and Arabin Kumar Dey <arabin@iitg.ac.in>
Examples
# Read data
data(precipitation)
data <- as.vector(precipitation[,2])
data[is.na(data)]<-0
n <- length(data)
# Construct the three-dimensional data set
data3d <- function(data){
u <- 12
Y <- c()
indx <- indx1 <- indx2 <- indx3 <- 0
r <- 5
i <- 2
while(i < n){
i <- i + 1
if(data[i] > u || sum(data[(i-1):i]) > u || sum(data[(i-2):i]) > u){
if(data[i] > u){imax <- i}
if(sum(data[(i-1):i]) > u){imax <- i - 3 + which(data[(i-1):i] == max(data[(i-1):i]))[1]}
if(sum(data[(i-2):i]) > u){imax <- i - 3 + which(data[(i-2):i] == max(data[(i-2):i]))[1]}
if(max(indx) > (imax-r)){
cluster <- data[(max(indx)+3):(imax+r)]
} else{
cluster <- data[(imax-r):(imax+r)]
}
cluster2 <- sapply(c(1:(length(cluster)-1)), function(j) sum(cluster[j:(j+1)]))
cluster3 <- sapply(c(1:(length(cluster)-2)), function(j) sum(cluster[j:(j+2)]))
indx1 <- append(indx1,imax-r-1+which(cluster==max(cluster))[1])
indx2 <- append(indx2,imax-r-1+which(cluster2==max(cluster2)))
indx3 <- append(indx3,imax-r-1+which(cluster3==max(cluster3)))
Y <- rbind(Y, c(max(cluster),max(cluster2),max(cluster3)))
indx <- append(indx,imax)
i <- i + r
}
}
return(Y)
}
I <- data3d(data)[,c(1,3)]
iniz <- intliz(I)
iniz
est <- estimates(I, iniz[1], iniz[2], iniz[3], iniz[4], iniz[5])
est[-9]
param.boot(I, iniz[1], iniz[2], iniz[3], iniz[4], iniz[5])
conf.intv(est)
Estimation of 3-parameter Block-Basu Bivariate Pareto (BBBVPA) distribution
Description
Parameters estimation of 3-parameter BBBVPA distribution.
Usage
estimates3(
I,
a0.int,
a1.int,
a2.int,
tol.est = 1e-05,
MxIter.no = 2000,
condition = "log.L"
)
Arguments
I |
bivariate observations. |
a0.int |
initial choice of |
a1.int |
initial choice of |
a2.int |
initial choice of |
tol.est |
convergence tolerance, |
MxIter.no |
maximum number of iterations, |
condition |
convergence criterion, |
Value
Object of class "bbbvpa3
", a list consisting of
alpha0 , alpha1 , alpha2 , iter.no |
estimates of parameters and number of iteration. |
data |
the supplied data |
Author(s)
Biplab Paul <paul.biplab497@gmail.com> and Arabin Kumar Dey <arabin@iitg.ac.in>
Examples
dat <- rbb.bvpa(500, 0, 0, 1.0, 1.0, 2.0, 0.4, 0.5)
estimates3(dat, 2.4, 0.3, 0.6)[-5]
Initialization of Block-Basu Bivariate Pareto (BBBVPA) distribution
Description
Return initial choice parameters of BBBVPA distribution.
Usage
intliz(
data,
ini.run = 100,
tol.ini = 0.001,
proc = "ML",
intv.s1 = c(0, 5),
intv.s2 = c(0, 5),
intv.a0 = c(0, 5),
intv.a1 = c(0, 5),
intv.a2 = c(0, 5),
...
)
Arguments
data |
bivariate observations. |
ini.run |
number of random initializations. |
tol.ini |
convergence tolerance, |
proc |
different procedures, |
intv.s1 |
interval for random initialization of |
intv.s2 |
interval for random initialization of |
intv.a0 |
interval for random initialization of |
intv.a1 |
interval for random initialization of |
intv.a2 |
interval for random initialization of |
... |
further arguments to pass to |
Value
numeric vector.
Author(s)
Biplab Paul <paul.biplab497@gmail.com> and Arabin Kumar Dey <arabin@iitg.ac.in>
Examples
# see the example of estimation
Initialization of 3-parameter Block-Basu Bivariate Pareto (BBBVPA) distribution
Description
Return initial choice parameters of 3-parameter BBBVPA distribution.
Usage
intliz3(
data,
ini.run = 100,
tol.ini = 0.001,
proc = "ML",
intv.a0 = c(0, 5),
intv.a1 = c(0, 5),
intv.a2 = c(0, 5),
...
)
Arguments
data |
bivariate observations. |
ini.run |
number of random initializations. |
tol.ini |
convergence tolerance, |
proc |
different procedures, |
intv.a0 |
interval for random initialization of |
intv.a1 |
interval for random initialization of |
intv.a2 |
interval for random initialization of |
... |
further arguments to pass to |
Value
numeric vector.
Author(s)
Biplab Paul <paul.biplab497@gmail.com> and Arabin Kumar Dey <arabin@iitg.ac.in>
Examples
dat <- rbb.bvpa(500, 0, 0, 1.0, 1.0, 2.0, 0.4, 0.5)
intliz3(dat)
Log-likelihood function of Block-Basu Bivariate Pareto (BBBVPA) distribution
Description
Return the log likelihood value.
Usage
logL(I, mu1, mu2, s1, s2, a0, a1, a2)
Arguments
I |
baivariate observations. |
mu1 |
value of |
mu2 |
value of |
s1 |
value of |
s2 |
value of |
a0 |
value of |
a1 |
value of |
a2 |
value of |
Value
a list consisting of
logLik |
A scalar numeric, log likelihood of the model. |
n1 , n2 |
|
Author(s)
Biplab Paul <paul.biplab497@gmail.com> and Arabin Kumar Dey <arabin@iitg.ac.in>
Examples
dat <- rbb.bvpa(500, 0.1, 0.1, 0.8, 0.8, 2.0, 0.4, 0.5)
logL(dat, 0.1, 0.1, 0.8, 0.8, 2.0, 0.4, 0.5)
Marginal log-liklihood function of variable X1
Description
Return the marginal log-liklihood value of variable X_1
.
Usage
mLf1(I, mu1, s1, a0, a1, a2)
Arguments
I |
baivariate observations. |
mu1 |
value of |
s1 |
value of |
a0 |
value of |
a1 |
value of |
a2 |
value of |
Value
A scalar numeric, the marginal log-liklihood value of variable X_1
.
Author(s)
Biplab Paul <paul.biplab497@gmail.com> and Arabin Kumar Dey <arabin@iitg.ac.in>
Examples
dat <- rbb.bvpa(500, 0.1, 0.1, 0.8, 0.8, 2.0, 0.4, 0.5)
mLf1(dat, 0.1, 0.8, 2.0, 0.4, 0.5)
Marginal log-liklihood function of variable X2
Description
Return the marginal log-liklihood value of variable X_2
.
Usage
mLf2(I, mu2, s2, a0, a1, a2)
Arguments
I |
baivariate observations. |
mu2 |
value of |
s2 |
value of |
a0 |
value of |
a1 |
value of |
a2 |
value of |
Value
A scalar numeric, the marginal log-liklihood value of variable X_2
.
Author(s)
Biplab Paul <paul.biplab497@gmail.com> and Arabin Kumar Dey <arabin@iitg.ac.in>
Examples
dat <- rbb.bvpa(500, 0.1, 0.1, 0.8, 0.8, 2.0, 0.4, 0.5)
mLf2(dat, 0.1, 0.8, 2.0, 0.4, 0.5)
Parametric bootstrap confidence intervals of parameters of Block-Basu Bivariate Pareto (BBBVPA) distribution
Description
Parametric bootstrap confidence interval of parameters of BBBVPA distribution.
Usage
param.boot(
data,
s1.int,
s2.int,
a0.int,
a1.int,
a2.int,
conf.lev = 0.95,
intv.m1 = c(0, 2),
intv.m2 = c(0, 2),
no.paboot = 100,
tol = 1e-04,
...
)
Arguments
data |
bivariate observations. |
s1.int |
initial choice of |
s2.int |
initial choice of |
a0.int |
initial choice of |
a1.int |
initial choice of |
a2.int |
initial choice of |
conf.lev |
confidence level, defult |
intv.m1 |
interval related to confidence interval of |
intv.m2 |
interval related to confidence interval of |
no.paboot |
number of bootstrap samples, |
tol |
convergence tolerance for confidence interval of |
... |
further arguments to pass to |
Value
A matrix of lower and upper confidence interval limits (in the first and second column respectively). The matrix rows are labeled by the parameter names (if any) and columns by the corresponding distribution quantiles.
Author(s)
Biplab Paul <paul.biplab497@gmail.com> and Arabin Kumar Dey <arabin@iitg.ac.in>
Examples
# see the example of estimation
Parametric bootstrap confidence intervals of parameters of 3-parameter Block-Basu Bivariate Pareto (BBBVPA) distribution
Description
Parametric bootstrap confidence interval of parameters of 3-parameter BBBVPA distribution.
Usage
param.boot3(
data,
a0.int,
a1.int,
a2.int,
conf.lev = 0.95,
no.paboot = 100,
...
)
Arguments
data |
bivariate observations. |
a0.int |
initial choice of |
a1.int |
initial choice of |
a2.int |
initial choice of |
conf.lev |
confidence level, defult 0.95. |
no.paboot |
number of bootstrap samples, |
... |
further arguments to pass to |
Value
A matrix of lower and upper confidence interval limits (in the first and second column respectively). The matrix rows are labeled by the parameter names (if any) and columns by the corresponding distribution quantiles.
Author(s)
Biplab Paul <paul.biplab497@gmail.com> and Arabin Kumar Dey <arabin@iitg.ac.in>
Examples
dat <- rbb.bvpa(500, 0, 0, 1.0, 1.0, 2.0, 0.4, 0.5)
param.boot3(dat, 2.4, 0.3, 0.6)
Survival functions of pivots of estimators of locations.
Description
Survival functions of pivots of estimators of locations \mu_1
and \mu_2
.
These are required to calculate the critical value of confidence intervals for \mu_1
and \mu_2
.
Usage
pctl.fun(z, n, a0, a1, a2, pct, select = 1)
Arguments
z |
quantiles. |
n |
number of observations. |
a0 |
value of |
a1 |
value of |
a2 |
value of |
pct |
probabilities. |
select |
Allows to select the function for different location parameters. a single model term to be selected for printing.
e.g. if you just want the function for |
Value
return a function.
Author(s)
Biplab Paul <paul.biplab497@gmail.com> and Arabin Kumar Dey <arabin@iitg.ac.in>
Examples
uniroot(pctl.fun, interval=c(0,2), n = 500, a0 = 2.0, a1 = 0.4, a2 = 0.5,
pct = 0.025, tol = 0.0001)[[1]]
Precipitation data
Description
The dataset contains daily accumulated precipitation data (in mm) from Abisko Scientific Research Station in northern Sweden for 100 years, from 1st January 1913 to 31st December 2012.
Usage
data(precipitation)
Format
A data frame with 36524 rows and 2 columns and the following variables:
- Time
1st column represents Day.
- Precipitation..mm.
2nd column represents daily accumulated precipitation (in mm) of the day.
Source
<https://www.polar.se/stoed-till-polarforskning/abisko-naturvetenskapliga-station/>
Examples
data(precipitation)
Pseudo log-likelihood function of Block-Basu Bivariate Pareto (BBBVPA) distribution
Description
Return the pseudo log likelihood value.
Usage
pseu.logL(I, mu1, mu2, s1, s2, a0, a1, a2)
Arguments
I |
baivariate observations. |
mu1 |
value of |
mu2 |
value of |
s1 |
value of |
s2 |
value of |
a0 |
value of |
a1 |
value of |
a2 |
value of |
Value
A scalar numeric, pseudo log likelihood of the model.
Author(s)
Biplab Paul <paul.biplab497@gmail.com> and Arabin Kumar Dey <arabin@iitg.ac.in>
Examples
dat <- rbb.bvpa(500, 0.1, 0.1, 0.8, 0.8, 2.0, 0.4, 0.5)
pseu.logL(dat, 0.1, 0.1, 0.8, 0.8, 2.0, 0.4, 0.5)
Simulate from a Block-Basu Bivariate Pareto (BBBVPA) distribution
Description
Produces one or more samples from the specified BBBVPA distribution.
Usage
rbb.bvpa(n, mu1, mu2, sig1, sig2, alp0, alp1, alp2)
Arguments
n |
number of observations. |
mu1 |
value of |
mu2 |
value of |
sig1 |
value of |
sig2 |
value of |
alp0 |
value of |
alp1 |
value of |
alp2 |
value of |
Value
numeric matrix.
Author(s)
Biplab Paul <paul.biplab497@gmail.com> and Arabin Kumar Dey <arabin@iitg.ac.in>
Examples
cor(rbb.bvpa(500, 0.1, 0.1, 0.8, 0.8, 2.0, 0.4, 0.5))