
Maximum likelihood estimation of the 2-parameter Perks distribution.
perks(lscale = "loglink", lshape = "loglink",
iscale = NULL, ishape = NULL,
gscale = exp(-5:5), gshape = exp(-5:5),
nsimEIM = 500, oim.mean = FALSE, zero = NULL, nowarning = FALSE)
Logical. Suppress a warning? Ignored for VGAM 0.9-7 and higher.
Parameter link functions applied to the
shape parameter shape
,
scale parameter scale
.
All parameters are treated as positive here
See Links
for more choices.
Optional initial values.
A NULL
means a value is computed internally.
To be currently ignored.
An object of class "vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
and vgam
.
A lot of care is needed because
this is a rather difficult distribution for parameter estimation.
If the self-starting initial values fail then try experimenting
with the initial value arguments, especially iscale
.
Successful convergence depends on having very good initial values.
Also, monitor convergence by setting trace = TRUE
.
The Perks distribution
has cumulative distribution function
scale
,
and
Simulated Fisher scoring is used and multiple responses are handled.
Perks, W. (1932) On some experiments in the graduation of mortality statistics. Journal of the Institute of Actuaries, 63, 12--40.
Richards, S. J. (2012) A handbook of parametric survival models for actuarial use. Scandinavian Actuarial Journal. 1--25.
# NOT RUN {
set.seed(123)
pdata <- data.frame(x2 = runif(nn <- 1000)) # x2 unused
pdata <- transform(pdata, eta1 = -1,
ceta1 = 1)
pdata <- transform(pdata, shape1 = exp(eta1),
scale1 = exp(ceta1))
pdata <- transform(pdata, y1 = rperks(nn, shape = shape1, scale = scale1))
fit1 <- vglm(y1 ~ 1, perks, data = pdata, trace = TRUE)
coef(fit1, matrix = TRUE)
summary(fit1)
# }
Run the code above in your browser using DataLab