bifgmexp: Bivariate Farlie-Gumbel-Morgenstern Exponential Distribution...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/family.bivariate.R

Description

Estimate the association parameter of FGM bivariate exponential distribution by maximum likelihood estimation.

Usage

1
bifgmexp(lapar = "rhobitlink", iapar = NULL, tola0 = 0.01, imethod = 1)

Arguments

lapar

Link function for the association parameter alpha, which lies between -1 and 1. See Links for more choices and other information.

iapar

Numeric. Optional initial value for alpha. By default, an initial value is chosen internally. If a convergence failure occurs try assigning a different value. Assigning a value will override the argument imethod.

tola0

Positive numeric. If the estimate of alpha has an absolute value less than this then it is replaced by this value. This is an attempt to fix a numerical problem when the estimate is too close to zero.

imethod

An integer with value 1 or 2 which specifies the initialization method. If failure to converge occurs try the other value, or else specify a value for ia.

Details

The cumulative distribution function is

P(Y1 <= y1, Y2 <= y2) = exp(-y1-y2) * ( 1 + alpha * [1 - exp(-y1)] * [1 - exp(-y2)] ) + 1 - exp(-y1) - exp(-y2)

for alpha between -1 and 1. The support of the function is for y1>0 and y2>0. The marginal distributions are an exponential distribution with unit mean. When alpha=0 then the random variables are independent, and this causes some problems in the estimation process since the distribution no longer depends on the parameter.

A variant of Newton-Raphson is used, which only seems to work for an intercept model. It is a very good idea to set trace = TRUE.

Value

An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm and vgam.

Note

The response must be a two-column matrix. Currently, the fitted value is a matrix with two columns and values equal to 1. This is because each marginal distribution corresponds to a exponential distribution with unit mean.

This VGAM family function should be used with caution.

Author(s)

T. W. Yee

References

Castillo, E., Hadi, A. S., Balakrishnan, N. Sarabia, J. S. (2005). Extreme Value and Related Models with Applications in Engineering and Science, Hoboken, NJ, USA: Wiley-Interscience.

See Also

bifgmcop, bigumbelIexp.

Examples

1
2
3
4
5
6
7
8
N <- 1000; mdata <- data.frame(y1 = rexp(N), y2 = rexp(N))
## Not run: plot(ymat)
fit <- vglm(cbind(y1, y2) ~ 1, bifgmexp, data = mdata, trace = TRUE)
fit <- vglm(cbind(y1, y2) ~ 1, bifgmexp, data = mdata, # This may fail
            trace = TRUE, crit = "coef")
coef(fit, matrix = TRUE)
Coef(fit)
head(fitted(fit))

Example output

Loading required package: stats4
Loading required package: splines
VGLM    linear loop  1 :  loglikelihood = -2024.0218
VGLM    linear loop  2 :  loglikelihood = -2024.0328
Taking a modified step....................
Warning messages:
1: In vglm.fitter(x = x, y = y, w = w, offset = offset, Xm2 = Xm2,  :
  iterations terminated because half-step sizes are very small
2: In vglm.fitter(x = x, y = y, w = w, offset = offset, Xm2 = Xm2,  :
  some quantities such as z, residuals, SEs may be inaccurate due to convergence at a half-step
VGLM    linear loop  1 :  coefficients = -0.012544349
VGLM    linear loop  2 :  coefficients = -0.028685601
VGLM    linear loop  3 :  coefficients = 0.0038774824
VGLM    linear loop  4 :  coefficients = -0.01226377
VGLM    linear loop  5 :  coefficients = -0.028405022
VGLM    linear loop  6 :  coefficients = 0.0038770692
VGLM    linear loop  7 :  coefficients = -0.012264183
VGLM    linear loop  8 :  coefficients = -0.028405435
VGLM    linear loop  9 :  coefficients = 0.0038770698
VGLM    linear loop  10 :  coefficients = -0.012264182
VGLM    linear loop  11 :  coefficients = -0.028405435
VGLM    linear loop  12 :  coefficients = 0.0038770698
VGLM    linear loop  13 :  coefficients = -0.012264182
VGLM    linear loop  14 :  coefficients = -0.028405435
VGLM    linear loop  15 :  coefficients = 0.0038770698
VGLM    linear loop  16 :  coefficients = -0.012264182
VGLM    linear loop  17 :  coefficients = -0.028405435
VGLM    linear loop  18 :  coefficients = 0.0038770698
VGLM    linear loop  19 :  coefficients = -0.012264182
VGLM    linear loop  20 :  coefficients = -0.028405435
VGLM    linear loop  21 :  coefficients = 0.0038770698
VGLM    linear loop  22 :  coefficients = -0.012264182
VGLM    linear loop  23 :  coefficients = -0.028405435
VGLM    linear loop  24 :  coefficients = 0.0038770698
VGLM    linear loop  25 :  coefficients = -0.012264182
VGLM    linear loop  26 :  coefficients = -0.028405435
VGLM    linear loop  27 :  coefficients = 0.0038770698
VGLM    linear loop  28 :  coefficients = -0.012264182
VGLM    linear loop  29 :  coefficients = -0.028405435
VGLM    linear loop  30 :  coefficients = 0.0038770698
Warning message:
In vglm.fitter(x = x, y = y, w = w, offset = offset, Xm2 = Xm2,  :
  convergence not obtained in 30 IRLS iterations
            rhobit(apar)
(Intercept)   0.00387707
       apar 
0.001938532 
  y1 y2
1  1  1
2  1  1
3  1  1
4  1  1
5  1  1
6  1  1

VGAM documentation built on Jan. 16, 2021, 5:21 p.m.