frechet2(location=0, lscale="loge", lshape="loglog",
escale = list(), eshape = list(),
iscale=NULL, ishape=3, zero=NULL)
frechet3(anchor=NULL, ldifference="loge",
lscale="loge", lshape="loglog",
edifference=list(), escale = list(), eshape = list(),
ilocation=NULL, iscale=NULL, ishape=3, zero=NULL,
effpos = .Machine$double.eps^0.75)Links for more choices.NULL means it is chosen internally.earg in Links for general information.min(y) where y is the response.
The location parameter is $A - D$ where
$A$ is the anchor,
$D$ is the ``difference'' (defaultNULL means it is chosen internally.effpos is considered
effectively positive."vglmff" (see vglmff-class).
The object is used by modelling functions such as vglm
and vgam.frechet3 can be very slow, especially if the
initial value for the location parameter is poor. Setting something
like maxit=200, trace=TRUE is a good idea.loglog link ensures $s>1$.
The variance of $Y$ is
$b^2 [ \Gamma(1-2/s) - \Gamma^2(1-1/s)]$
for $s>2$. frechet2 has $a$ known whereas frechet3
estimates it. Estimating $a$ well requires a lot of data and
a good choice of ilocation will help speed up convergence.
For frechet3 the default linear/additive predictors are
$\log(D)$,
$\log(b)$,
$\log\log(s)$, respectively.
It would be great if the first linear/additive predictor was a direct
function of the location parameter, but this can run the risk that
the estimate is out of range (i.e., greater than min(y)).
rfrechet.y = rfrechet(n <- 1000, shape=exp(exp(0)))
hist(y)
fit2 = vglm(y ~ 1, frechet2, trace=TRUE, maxit=155)
fit3 = vglm(y ~ 1, frechet3(ilocation=0), trace=TRUE, maxit=155)
coef(fit3, matrix=TRUE)
Coef(fit3)
fitted(fit3)[1:5,]
mean(y)
weights(fit3, type="w")[1:5,]
vcov(fit3) # caution needed!
fit3@extra$location[1:3] # Estimate of the location parameter
fit3@extra$LHSanchor # Anchor point
min(y)Run the code above in your browser using DataLab