# fisk: Fisk Distribution family function In VGAM: Vector Generalized Linear and Additive Models

## Description

Maximum likelihood estimation of the 2-parameter Fisk distribution.

## Usage

 ```1 2 3 4``` ```fisk(lscale = "loglink", lshape1.a = "loglink", iscale = NULL, ishape1.a = NULL, imethod = 1, lss = TRUE, gscale = exp(-5:5), gshape1.a = seq(0.75, 4, by = 0.25), probs.y = c(0.25, 0.5, 0.75), zero = "shape") ```

## Arguments

 `lss` See `CommonVGAMffArguments` for important information. `lshape1.a, lscale` Parameter link functions applied to the (positive) parameters a and `scale`. See `Links` for more choices. `iscale, ishape1.a, imethod, zero` See `CommonVGAMffArguments` for information. For `imethod = 2` a good initial value for `iscale` is needed to obtain a good estimate for the other parameter. `gscale, gshape1.a` See `CommonVGAMffArguments` for information. `probs.y` See `CommonVGAMffArguments` for information.

## Details

The 2-parameter Fisk (aka log-logistic) distribution is the 4-parameter generalized beta II distribution with shape parameter q=p=1. It is also the 3-parameter Singh-Maddala distribution with shape parameter q=1, as well as the Dagum distribution with p=1. More details can be found in Kleiber and Kotz (2003).

The Fisk distribution has density

f(y) = a y^(a-1) / [b^a (1 + (y/b)^a)^2]

for a > 0, b > 0, y >= 0. Here, b is the scale parameter `scale`, and a is a shape parameter. The cumulative distribution function is

F(y) = 1 - [1 + (y/b)^a]^(-1) = [1 + (y/b)^(-a)]^(-1).

The mean is

E(Y) = b gamma(1 + 1/a) gamma(1 - 1/a)

provided a > 1; these are returned as the fitted values. This family function handles multiple responses.

## Value

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

## Note

See the notes in `genbetaII`.

T. W. Yee

## References

Kleiber, C. and Kotz, S. (2003). Statistical Size Distributions in Economics and Actuarial Sciences, Hoboken, NJ, USA: Wiley-Interscience.

`Fisk`, `genbetaII`, `betaII`, `dagum`, `sinmad`, `inv.lomax`, `lomax`, `paralogistic`, `inv.paralogistic`, `simulate.vlm`.

## Examples

 ```1 2 3 4 5 6``` ```fdata <- data.frame(y = rfisk(n = 200, shape = exp(1), scale = exp(2))) fit <- vglm(y ~ 1, fisk(lss = FALSE), data = fdata, trace = TRUE) fit <- vglm(y ~ 1, fisk(ishape1.a = exp(2)), data = fdata, trace = TRUE) coef(fit, matrix = TRUE) Coef(fit) summary(fit) ```

### Example output

```Loading required package: stats4
VGLM    linear loop  1 :  loglikelihood = -627.60791
VGLM    linear loop  2 :  loglikelihood = -627.60786
VGLM    linear loop  3 :  loglikelihood = -627.60786
VGLM    linear loop  1 :  loglikelihood = -717.9889
VGLM    linear loop  2 :  loglikelihood = -647.18601
VGLM    linear loop  3 :  loglikelihood = -628.49268
VGLM    linear loop  4 :  loglikelihood = -627.6093
VGLM    linear loop  5 :  loglikelihood = -627.60786
VGLM    linear loop  6 :  loglikelihood = -627.60786
(Intercept)       2.020942         0.9049797
scale shape1.a
7.545433 2.471882

Call:
vglm(formula = y ~ 1, family = fisk(ishape1.a = exp(2)), data = fdata,
trace = TRUE)

Pearson residuals:
Min      1Q   Median     3Q    Max
loglink(scale)    -1.681 -0.9244 0.005981 0.9394 1.7301
loglink(shape1.a) -5.375 -0.4263 0.291090 0.7389 0.8363

Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept):1  2.02094    0.04955   40.79   <2e-16 ***
(Intercept):2  0.90498    0.05913   15.30   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1