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 |
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.
Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>
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 Bivariate BBBVPA distribution.
conf.intv( object, conf.lev = 0.95, tol = 1e-04, intv.m1 = c(0, 2), intv.m2 = c(0, 2) )
conf.intv( object, conf.lev = 0.95, tol = 1e-04, intv.m1 = c(0, 2), intv.m2 = c(0, 2) )
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 |
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.
Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>
# see the example of estimation
# see the example of estimation
Observed Fisher information based confidence interval of 3-parameter BBBVPA distribution.
conf.intv3(object, conf.lev = 0.95, tol = 1e-04)
conf.intv3(object, conf.lev = 0.95, tol = 1e-04)
object |
|
conf.lev |
confidence level, |
tol |
convergence tolerance for confidence intervals, |
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.
Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>
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))
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))
Parameters estimation of BBBVPA distribution.
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" )
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" )
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, |
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 |
Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>
# 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)
# 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)
Parameters estimation of 3-parameter BBBVPA distribution.
estimates3( I, a0.int, a1.int, a2.int, tol.est = 1e-05, MxIter.no = 2000, condition = "log.L" )
estimates3( I, a0.int, a1.int, a2.int, tol.est = 1e-05, MxIter.no = 2000, condition = "log.L" )
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, |
Object of class "bbbvpa3
", a list consisting of
alpha0 , alpha1 , alpha2 , iter.no
|
estimates of parameters and number of iteration. |
data |
the supplied data |
Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>
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]
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]
Return initial choice parameters of BBBVPA distribution.
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), ... )
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), ... )
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 |
numeric vector.
Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>
# see the example of estimation
# see the example of estimation
Return initial choice parameters of 3-parameter BBBVPA distribution.
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), ... )
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), ... )
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 |
numeric vector.
Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>
dat <- rbb.bvpa(500, 0, 0, 1.0, 1.0, 2.0, 0.4, 0.5) intliz3(dat)
dat <- rbb.bvpa(500, 0, 0, 1.0, 1.0, 2.0, 0.4, 0.5) intliz3(dat)
Return the log likelihood value.
logL(I, mu1, mu2, s1, s2, a0, a1, a2)
logL(I, mu1, mu2, s1, s2, a0, a1, a2)
I |
baivariate observations. |
mu1 |
value of |
mu2 |
value of |
s1 |
value of |
s2 |
value of |
a0 |
value of |
a1 |
value of |
a2 |
value of |
a list consisting of
logLik |
A scalar numeric, log likelihood of the model. |
n1 , n2
|
|
Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>
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)
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)
Return the marginal log-liklihood value of variable .
mLf1(I, mu1, s1, a0, a1, a2)
mLf1(I, mu1, s1, a0, a1, a2)
I |
baivariate observations. |
mu1 |
value of |
s1 |
value of |
a0 |
value of |
a1 |
value of |
a2 |
value of |
A scalar numeric, the marginal log-liklihood value of variable .
Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>
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)
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)
Return the marginal log-liklihood value of variable .
mLf2(I, mu2, s2, a0, a1, a2)
mLf2(I, mu2, s2, a0, a1, a2)
I |
baivariate observations. |
mu2 |
value of |
s2 |
value of |
a0 |
value of |
a1 |
value of |
a2 |
value of |
A scalar numeric, the marginal log-liklihood value of variable .
Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>
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)
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 interval of parameters of BBBVPA distribution.
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, ... )
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, ... )
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 |
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.
Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>
# see the example of estimation
# see the example of estimation
Parametric bootstrap confidence interval of parameters of 3-parameter BBBVPA distribution.
param.boot3( data, a0.int, a1.int, a2.int, conf.lev = 0.95, no.paboot = 100, ... )
param.boot3( data, a0.int, a1.int, a2.int, conf.lev = 0.95, no.paboot = 100, ... )
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 |
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.
Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>
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)
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 and
.
These are required to calculate the critical value of confidence intervals for
and
.
pctl.fun(z, n, a0, a1, a2, pct, select = 1)
pctl.fun(z, n, a0, a1, a2, pct, select = 1)
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 |
return a function.
Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>
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]]
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]]
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.
data(precipitation)
data(precipitation)
A data frame with 36524 rows and 2 columns and the following variables:
1st column represents Day.
2nd column represents daily accumulated precipitation (in mm) of the day.
<https://www.polar.se/stoed-till-polarforskning/abisko-naturvetenskapliga-station/>
data(precipitation)
data(precipitation)
Return the pseudo log likelihood value.
pseu.logL(I, mu1, mu2, s1, s2, a0, a1, a2)
pseu.logL(I, mu1, mu2, s1, s2, a0, a1, a2)
I |
baivariate observations. |
mu1 |
value of |
mu2 |
value of |
s1 |
value of |
s2 |
value of |
a0 |
value of |
a1 |
value of |
a2 |
value of |
A scalar numeric, pseudo log likelihood of the model.
Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>
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)
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)
Produces one or more samples from the specified BBBVPA distribution.
rbb.bvpa(n, mu1, mu2, sig1, sig2, alp0, alp1, alp2)
rbb.bvpa(n, mu1, mu2, sig1, sig2, alp0, alp1, alp2)
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 |
numeric matrix.
Biplab Paul <[email protected]> and Arabin Kumar Dey <[email protected]>
cor(rbb.bvpa(500, 0.1, 0.1, 0.8, 0.8, 2.0, 0.4, 0.5))
cor(rbb.bvpa(500, 0.1, 0.1, 0.8, 0.8, 2.0, 0.4, 0.5))