Exponential Logarithmic Distribution Family Function
explogff.RdEstimates the two parameters of the exponential logarithmic distribution by maximum likelihood estimation.
Usage
explogff(lscale = "loglink", lshape = "logitlink",
iscale = NULL, ishape = NULL,
tol12 = 1e-05, zero = 1, nsimEIM = 400)Arguments
- lscale, lshape
See
CommonVGAMffArgumentsfor information.- tol12
Numeric. Tolerance for testing whether a parameter has value 1 or 2.
- iscale, ishape, zero, nsimEIM
Details
The exponential logarithmic distribution has density function $$f(y; c, s) = (1/(-\log p )) (((1/c) (1 - s) e^{-y/c}) / (1 - (1 - s) e^{-y/c}))$$ where \(y > 0\), scale parameter \(c > 0\), and shape parameter \(s \in (0, 1)\). The mean, \((-polylog(2, 1 - p) c) / \log(s)\) is not returned as the fitted values. Note the median is \(c \log(1 + \sqrt{s})\) and it is currently returned as the fitted values. Simulated Fisher scoring is implemented.
Value
An object of class "vglmff" (see vglmff-class).
The object is used by modelling functions such as vglm
and vgam.
References
Tahmasabi, R., Sadegh, R. (2008). A two-parameter lifetime distribution with decreasing failure rate. Computational Statistics and Data Analysis, 52, 3889–3901.
Note
We define scale as the reciprocal of the rate parameter
used by Tahmasabi and Sadegh (2008).
Yet to do: find a polylog() function.
Examples
if (FALSE) Scale <- exp(2); shape <- logitlink(-1, inverse = TRUE)
edata <- data.frame(y = rexplog(n = 2000, scale = Scale, shape = shape))
#> Error: object 'Scale' not found
fit <- vglm(y ~ 1, explogff, data = edata, trace = TRUE)
#> Error in eval(mf, parent.frame()): object 'edata' not found
c(with(edata, median(y)), head(fitted(fit), 1))
#> Error: object 'edata' not found
coef(fit, matrix = TRUE)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'coef': object 'fit' not found
Coef(fit)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'Coef': object 'fit' not found
summary(fit)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': object 'fit' not found
# \dontrun{}