Last chance! 50% off unlimited learning
Sale ends in
Estimates either the location parameter or both the location and scale parameters of the Cauchy distribution by maximum likelihood estimation.
cauchy(llocation = "identitylink", lscale = "loglink",
imethod = 1, ilocation = NULL, iscale = NULL,
gprobs.y = ppoints(19), gscale.mux = exp(-3:3), zero = "scale")
cauchy1(scale.arg = 1, llocation = "identitylink", ilocation = NULL,
imethod = 1, gprobs.y = ppoints(19), zero = NULL)
An object of class "vglmff"
(see
vglmff-class
). The object is used by modelling
functions such as vglm
, and vgam
.
Parameter link functions for the location parameter Links
for more choices.
Optional initial value for
Integer, either 1 or 2 or 3.
Initial method, three algorithms are implemented.
The user should try all possible values to help avoid
converging to a local solution.
Also, choose the another value if convergence fails, or use
ilocation
and/or iscale
.
See CommonVGAMffArguments
for information.
Known (positive) scale parameter, called
It is well-known that the Cauchy distribution may have
local maximums in its likelihood function; make full use of
imethod
, ilocation
, iscale
etc.
T. W. Yee
The Cauchy distribution has density function
If the scale parameter is known (cauchy1
) then there
may be multiple local maximum likelihood solutions for the
location parameter. However, if both location and scale
parameters are to be estimated (cauchy
) then there
is a unique maximum likelihood solution provided
Forbes, C., Evans, M., Hastings, N. and Peacock, B. (2011). Statistical Distributions, Hoboken, NJ, USA: John Wiley and Sons, Fourth edition.
Barnett, V. D. (1966). Evaluation of the maximum-likehood estimator where the likelihood equation has multiple roots. Biometrika, 53, 151--165.
Copas, J. B. (1975). On the unimodality of the likelihood for the Cauchy distribution. Biometrika, 62, 701--704.
Efron, B. and Hinkley, D. V. (1978). Assessing the accuracy of the maximum likelihood estimator: Observed versus expected Fisher information. Biometrika, 65, 457--481.
Cauchy
,
cauchit
,
studentt
,
simulate.vlm
.
# Both location and scale parameters unknown
set.seed(123)
cdata <- data.frame(x2 = runif(nn <- 1000))
cdata <- transform(cdata, loc = exp(1 + 0.5 * x2), scale = exp(1))
cdata <- transform(cdata, y2 = rcauchy(nn, loc, scale))
fit2 <- vglm(y2 ~ x2, cauchy(lloc = "loglink"), data = cdata)
coef(fit2, matrix = TRUE)
head(fitted(fit2)) # Location estimates
summary(fit2)
# Location parameter unknown
cdata <- transform(cdata, scale1 = 0.4)
cdata <- transform(cdata, y1 = rcauchy(nn, loc, scale1))
fit1 <- vglm(y1 ~ x2, cauchy1(scale = 0.4), data = cdata, trace = TRUE)
coef(fit1, matrix = TRUE)
Run the code above in your browser using DataLab