dMGLMGA: The bivariate GLMGA distribution

Description Usage Arguments Value Examples

View source: R/MGLMGA-distribution.r

Description

The bivariate GLMGA distribution

Usage

1
dMGLMGA(y1, y2, sigma, a, b)

Arguments

y1

vector of quantiles.

y2

vector of quantiles.

sigma

vector of parameters with length = 2.

a

common parameter with length = 1.

b

vector of parameters with length = 2.

Value

Density function of the bivariate GLMGA distribution with parameters sigma, a and b.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
n.grid <- 20
sigma <- c(0.5, 0.5)
a <- 20
b <- c(5, 5)
xgrid <- ygrid <- seq(0.01, 20, length.out = n.grid)
grid <- expand.grid("u1" = xgrid, "u2" = ygrid)
mtrx3d <- matrix(0, nrow = nrow(grid), ncol = 3)
mtrx3d[, 1] <- grid[, 1]
mtrx3d[, 2] <- grid[, 2]
for (i in 1:nrow(mtrx3d)) {
  mtrx3d[i, 3] <- dMGLMGA(
    y1 = grid[i, 1], y2 = grid[i, 2],
    sigma = sigma,
    a = a, b = b
  )
}
head(mtrx3d)

lizhengxiao/rMGLReg documentation built on Jan. 2, 2022, 8:52 a.m.