Package 'bvpa'

Title: 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 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".
Authors: Biplab Paul [aut, cre], Arabin Kumar Dey [aut]
Maintainer: Biplab Paul <[email protected]>
License: GPL (>= 2)
Version: 1.0.0
Built: 2025-03-01 02:48:44 UTC
Source: https://github.com/cran/bvpa

Help Index


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 <[email protected]> and Arabin Kumar Dey <[email protected]>

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

"bbbvpa" class object.

conf.lev

confidence level, 0.950.95 (default).

tol

convergence tolerance for confidence intervals, 0.0001 (default).

intv.m1

interval related to confidence interval of μ1\mu_1, c(0,2) (default).

intv.m2

interval related to confidence interval of μ1\mu_1, c(0,2) (default).

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 <[email protected]> and Arabin Kumar Dey <[email protected]>

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

"bbbvpa" class object.

conf.lev

confidence level, 0.950.95 (default).

tol

convergence tolerance for confidence intervals, 0.0001 (default).

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 <[email protected]> and Arabin Kumar Dey <[email protected]>

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 σ1\sigma_1.

s2.int

initial choice of σ2\sigma_2.

a0.int

initial choice of α0\alpha_0.

a1.int

initial choice of α1\alpha_1.

a2.int

initial choice of α2\alpha_2.

tol.est

convergence tolerance, 0.00001 (default).

MxIter.no

maximum number of iterations, 2000 (default).

rate

step size or learning rate for gradient descent, 0.0001 (default).

condition

convergence criterion, "log.L" (default) and "p.logL".

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 I.

Author(s)

Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>

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 α0\alpha_0.

a1.int

initial choice of α1\alpha_1.

a2.int

initial choice of α2\alpha_2.

tol.est

convergence tolerance, 0.0001 (default).

MxIter.no

maximum number of iterations, 2000 (default).

condition

convergence criterion, "log.L" (default) and "p.logL".

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 I.

Author(s)

Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>

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, 0.001 (default)..

proc

different procedures, "ML" (default) and "S.EM".

intv.s1

interval for random initialization of σ1\sigma_1.

intv.s2

interval for random initialization of σ2\sigma_2.

intv.a0

interval for random initialization of α0\alpha_0.

intv.a1

interval for random initialization of α1\alpha_1.

intv.a2

interval for random initialization of α2\alpha_2.

...

further arguments to pass to estimates.

Value

numeric vector.

Author(s)

Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>

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, 0.001 (default)..

proc

different procedures, "ML" (default) and "S.EM".

intv.a0

interval for random initialization of α0\alpha_0.

intv.a1

interval for random initialization of α1\alpha_1.

intv.a2

interval for random initialization of α2\alpha_2.

...

further arguments to pass to estimates3.

Value

numeric vector.

Author(s)

Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>

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 μ1\mu_1.

mu2

value of μ2\mu_2.

s1

value of σ1\sigma_1.

s2

value of σ2\sigma_2.

a0

value of α0\alpha_0.

a1

value of α1\alpha_1.

a2

value of α2\alpha_2.

Value

a list consisting of

logLik

A scalar numeric, log likelihood of the model.

n1, n2

n1n_1 and n2n_2.

Author(s)

Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>

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 X1X_1.

Usage

mLf1(I, mu1, s1, a0, a1, a2)

Arguments

I

baivariate observations.

mu1

value of μ1\mu_1.

s1

value of σ1\sigma_1.

a0

value of α0\alpha_0.

a1

value of α1\alpha_1.

a2

value of α2\alpha_2.

Value

A scalar numeric, the marginal log-liklihood value of variable X1X_1.

Author(s)

Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>

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 X2X_2.

Usage

mLf2(I, mu2, s2, a0, a1, a2)

Arguments

I

baivariate observations.

mu2

value of μ2\mu_2.

s2

value of σ2\sigma_2.

a0

value of α0\alpha_0.

a1

value of α1\alpha_1.

a2

value of α2\alpha_2.

Value

A scalar numeric, the marginal log-liklihood value of variable X2X_2.

Author(s)

Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>

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 σ1\sigma_1.

s2.int

initial choice of σ2\sigma_2.

a0.int

initial choice of α0\alpha_0.

a1.int

initial choice of α1\alpha_1.

a2.int

initial choice of α2\alpha_2.

conf.lev

confidence level, defult 0.950.95.

intv.m1

interval related to confidence interval of μ1\mu_1, c(0,2) (default).

intv.m2

interval related to confidence interval of μ1\mu_1, c(0,2) (default).

no.paboot

number of bootstrap samples, 100 (default).

tol

convergence tolerance for confidence interval of μ1\mu_1. and μ2\mu_2, 0.0001 (default).

...

further arguments to pass to estimates.

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 <[email protected]> and Arabin Kumar Dey <[email protected]>

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 α0\alpha_0.

a1.int

initial choice of α1\alpha_1.

a2.int

initial choice of α2\alpha_2.

conf.lev

confidence level, defult 0.95.

no.paboot

number of bootstrap samples, 100 (default).

...

further arguments to pass to estimates3.

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 <[email protected]> and Arabin Kumar Dey <[email protected]>

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 μ1\mu_1 and μ2\mu_2. These are required to calculate the critical value of confidence intervals for μ1\mu_1 and μ2\mu_2.

Usage

pctl.fun(z, n, a0, a1, a2, pct, select = 1)

Arguments

z

quantiles.

n

number of observations.

a0

value of α0\alpha_0.

a1

value of α1\alpha_1.

a2

value of α2\alpha_2.

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 μ1\mu_1 set select=1select=1 (default).

Value

return a function.

Author(s)

Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>

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 μ1\mu_1.

mu2

value of μ2\mu_2.

s1

value of σ1\sigma_1.

s2

value of σ2\sigma_2.

a0

value of α0\alpha_0.

a1

value of α1\alpha_1.

a2

value of α2\alpha_2.

Value

A scalar numeric, pseudo log likelihood of the model.

Author(s)

Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>

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 μ1\mu_1

mu2

value of μ2\mu_2

sig1

value of σ1\sigma_1

sig2

value of σ2\sigma_2

alp0

value of α0\alpha_0

alp1

value of α1\alpha_1

alp2

value of α2\alpha_2

Value

numeric matrix.

Author(s)

Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>

Examples

cor(rbb.bvpa(500, 0.1, 0.1, 0.8, 0.8, 2.0, 0.4, 0.5))