cauchy(llocation = "identity", lscale = "loge",
ilocation = NULL, iscale = NULL,
iprobs = seq(0.2, 0.8, by = 0.2),
imethod = 1, nsimEIM = NULL, zero = 2)
cauchy1(scale.arg = 1, llocation = "identity",
ilocation = NULL, imethod = 1)
Links
for more choices.ilocation
iscale
.CommonVGAMffArguments
for more information."vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
and vgam
.imethod
, ilocation
, iscale
etc.nsimEIM
is specified then
Fisher scoring with simulation is used.
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 $n > 2$ and less than half the data
are located at any one point.
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
.# Both location and scale parameters unknown
cdata1 <- data.frame(x = runif(nn <- 1000))
cdata1 <- transform(cdata1, loc = exp(1+0.5*x), scale = exp(1))
cdata1 <- transform(cdata1, y = rcauchy(nn, loc, scale))
fit <- vglm(y ~ x, cauchy(lloc = "loge"), cdata1, trace = TRUE)
coef(fit, matrix = TRUE)
head(fitted(fit)) # Location estimates
summary(fit)
# Location parameter unknown
set.seed(123)
cdata2 <- data.frame(x = runif(nn <- 500))
cdata2 <- transform(cdata2, loc = 1 + 0.5 * x, scale = 0.4)
cdata2 <- transform(cdata2, y = rcauchy(nn, loc, scale))
fit <- vglm(y ~ x, cauchy1(scale = 0.4), cdata2, trace = TRUE, crit = "coef")
coef(fit, matrix = TRUE)
Run the code above in your browser using DataLab