cauchy1 {VGAM} | R Documentation |
Estimates the location parameter of the Cauchy distribution by maximum likelihood estimation.
cauchy1(scale.arg=1, llocation="identity", ilocation=NULL, method.init=1)
scale.arg |
Known (positive) scale parameter, called s below.
|
llocation |
Parameter link function for the a location parameter.
See Links for more choices.
|
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 .
|
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 NA
s.
Fisher scoring is used.
An object of class "vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
rrvglm
and vgam
.
Good initial values are needed. It pays to select a wide range
of initial values via the ilocation
and method.init
arguments.
T. W. Yee
Evans, M., Hastings, N. and Peacock, B. (2000) Statistical Distributions, New York: Wiley-Interscience, Third edition.
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)