# slash: Slash Distribution Family Function In VGAM: Vector Generalized Linear and Additive Models

## Description

Estimates the two parameters of the slash distribution by maximum likelihood estimation.

## Usage

 ```1 2 3``` ```slash(lmu = "identitylink", lsigma = "loglink", imu = NULL, isigma = NULL, gprobs.y = ppoints(8), nsimEIM = 250, zero = NULL, smallno = .Machine\$double.eps*1000) ```

## Arguments

 `lmu, lsigma` Parameter link functions applied to the mu and sigma parameters, respectively. See `Links` for more choices.
 `imu, isigma` Initial values. A `NULL` means an initial value is chosen internally. See `CommonVGAMffArguments` for more information. `gprobs.y` Used to compute the initial values for `mu`. This argument is fed into the `probs` argument of `quantile` to construct a grid, which is used to evaluate the log-likelihood. This must have values between 0 and 1. `nsimEIM, zero` See `CommonVGAMffArguments` for information. `smallno` Small positive number, used to test for the singularity.

## Details

The standard slash distribution is the distribution of the ratio of a standard normal variable to an independent standard uniform(0,1) variable. It is mainly of use in simulation studies. One of its properties is that it has heavy tails, similar to those of the Cauchy.

The general slash distribution can be obtained by replacing the univariate normal variable by a general normal N(mu,sigma) random variable. It has a density that can be written as

f(y) = 1/(2*sigma*sqrt(2*pi)) if y=mu = 1-exp(-(((x-mu)/sigma)^2)/2))/(sqrt(2*pi)*sigma*((x-mu)/sigma)^2) if y!=mu

where mu and sigma are the mean and standard deviation of the univariate normal distribution respectively.

## Value

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

## Note

Fisher scoring using simulation is used. Convergence is often quite slow. Numerical problems may occur.

## Author(s)

T. W. Yee and C. S. Chee

## References

Johnson, N. L. and Kotz, S. and Balakrishnan, N. (1994). Continuous Univariate Distributions, 2nd edition, Volume 1, New York: Wiley.

Kafadar, K. (1982). A Biweight Approach to the One-Sample Problem Journal of the American Statistical Association, 77, 416–424.

`rslash`, `simulate.vlm`.

## Examples

 ```1 2 3 4 5 6 7 8``` ```## Not run: sdata <- data.frame(y = rslash(n = 1000, mu = 4, sigma = exp(2))) fit <- vglm(y ~ 1, slash, data = sdata, trace = TRUE) coef(fit, matrix = TRUE) Coef(fit) summary(fit) ## End(Not run) ```

### Example output

```Loading required package: stats4
VGLM    linear loop  1 :  loglikelihood = -4979.4228
VGLM    linear loop  2 :  loglikelihood = -4944.1548
VGLM    linear loop  3 :  loglikelihood = -4850.9323
VGLM    linear loop  4 :  loglikelihood = -4833.9557
VGLM    linear loop  5 :  loglikelihood = -4821.8525
VGLM    linear loop  6 :  loglikelihood = -4819.3752
VGLM    linear loop  7 :  loglikelihood = -4818.9378
VGLM    linear loop  8 :  loglikelihood = -4818.8661
VGLM    linear loop  9 :  loglikelihood = -4818.8523
VGLM    linear loop  10 :  loglikelihood = -4818.8497
VGLM    linear loop  11 :  loglikelihood = -4818.8491
VGLM    linear loop  12 :  loglikelihood = -4818.849
VGLM    linear loop  13 :  loglikelihood = -4818.849
VGLM    linear loop  14 :  loglikelihood = -4818.849
(Intercept) 7.120096       2.014675
mu    sigma
7.120096 7.498290

Call:
vglm(formula = y ~ 1, family = slash, data = sdata, trace = TRUE)

Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept):1  7.12010    0.54183   13.14   <2e-16 ***
(Intercept):2  2.01467    0.04071   49.49   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Names of linear predictors: mu, loglink(sigma)

Log-likelihood: -4818.849 on 1998 degrees of freedom

Number of Fisher scoring iterations: 14

No Hauck-Donner effect found in any of the estimates
```

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