glogisfit(x, ...)
"glogisfit"(x, weights = NULL, start = NULL, fixed = c(NA, NA, NA), method = "BFGS", hessian = TRUE, ...)
"glogisfit"(formula, data, subset, na.action, weights, x = TRUE, ...)
"plot"(x, main = "", xlab = NULL, fill = "lightgray", col = "blue", lwd = 1, lty = 1, xlim = NULL, ylim = NULL, legend = "topright", moments = FALSE, ...)
"summary"(object, log = TRUE, breaks = NULL, ...)
"coef"(object, log = TRUE, ...)
"vcov"(object, log = TRUE, ...)
location
, log(scale)
, log(shape)
where the
original parameters (without logs) are as in dglogis
. Default
is to use c(0, 0, 0)
(i.e., standard logistic). For details see below.start
).
NA
signals that the corresponding parameter should be estimated.
A standard logistic distribution could thus be fitted via fixed = c(NA, NA, 0)
.optim
for the available options. Further options can be passed to optim
through
...
.FALSE
, no covariances or standard errors will be available in
subsequent computations.x ~ 1
is
supported.model.frame
.legend = FALSE
suppresses the legend.
See legend
for the character specification.moments = FALSE
, default) or the implied moments of the
distribution.glogisfit
object.glogisfit
returns an object of class "glogisfit"
, i.e., a list with components as follows.
optim
call for maximizing the log-likelihood,optim
call,optim
call,optim
,formula
method was used).glogisfit
estimates the generalized logistic distribution (Type I: skew-logistic)
as given by dglogis
. Optimization is performed numerically by
optim
using analytical gradients. For obtaining numerically more
stable results the scale and shape parameters are specified in logs. Starting values
are chosen as c(0, 0, 0)
, i.e., corresponding to a standard (symmetric) logistic
distribution. If these fail, better starting values are obtained by running a Nelder-Mead
optimization on the original problem (without logs) first.
A large list of standard extractor methods is supplied to conveniently compute
with the fitted objects, including methods to the generic functions
print
, summary
, plot
(reusing hist
and lines
), coef
,
vcov
, logLik
, residuals
,
and estfun
and
bread
(from the sandwich package). The methods for coef
, vcov
, summary
, and bread
report computations
pertaining to the scale/shape parameters in logs by default, but allow for switching back to
the original levels (employing the delta method).
Visualization employs a histogramm of the original data along with lines for the estimated
density.
Further structural change methods for "glogisfit"
objects are described in
breakpoints.glogisfit
.
Windberger T, Zeileis A (2014). Structural Breaks in Inflation Dynamics within the European Monetary Union. Eastern European Economics, 52(3), 66--88.
dglogis
, dlogis
, breakpoints.glogisfit
## simple artificial example
set.seed(2)
x <- rglogis(1000, -1, scale = 0.5, shape = 3)
gf <- glogisfit(x)
plot(gf)
summary(gf)
## query parameters and associated moments
coef(gf)
coef(gf, log = FALSE)
gf$parameters
gf$moments
Run the code above in your browser using DataLab