cauchy1 {VGAM}R Documentation

Cauchy Distribution Family Function

Description

Estimates the location parameter of the Cauchy distribution by maximum likelihood estimation.

Usage

cauchy1(scale.arg=1, llocation="identity",
        elocation=list(), ilocation=NULL, method.init=1)

Arguments

scale.arg Known (positive) scale parameter, called s below.
llocation Parameter link function for the a location parameter. See Links for more choices.
elocation List. Extra argument for the link. See earg in Links for general information.
ilocation Optional initial value for a. By default, an initial value is chosen internally.
method.init Integer, either 1 or 2 or 3. Initial method, three algorithms are implemented. Choose the another value if convergence fails, or use ilocation.

Details

The Cauchy distribution has a density function

f(y;a,s) = 1 / [pi * s * [1 + ((y-a)/s)^2]]

where y and a are real and finite, and s>0. The distribution is symmetric about a and has a heavy tail. Its median and mode are a, but the mean does not exist, therefore the fitted values are all NAs. Fisher scoring is used.

Value

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

Note

Good initial values are needed. It pays to select a wide range of initial values via the ilocation and method.init arguments.

Author(s)

T. W. Yee

References

Evans, M., Hastings, N. and Peacock, B. (2000) Statistical Distributions, New York: Wiley-Interscience, Third edition.

See Also

Cauchy, cauchit.

Examples

set.seed(123)
n = 500
x = runif(n)

y = rcauchy(n, loc=1+5*x, scale=.4)
fit = vglm(y ~ x, cauchy1(scale=0.4), trace =TRUE, crit="c")
coef(fit, matrix=TRUE)

y = rcauchy(n, loc=exp(1+0.5*x), scale=.4)
## Not run: hist(y)
fit = vglm(y ~ x, cauchy1(scale=0.4, lloc="loge"), trace=TRUE, crit="c")
coef(fit, matrix=TRUE)
fitted(fit)[1:4]
summary(fit)

[Package VGAM version 0.7-3 Index]