breakpoints.glogisfit: Segmented Fitting of the Generalized Logistic Distribution

View source: R/breakpoints.glogisfit.R

breakpoints.glogisfitR Documentation

Segmented Fitting of the Generalized Logistic Distribution


Fitting univariate generalized logisitc distributions (Type I: skew-logistic with location, scale, and shape parameters) to segments of time series data.


## S3 method for class 'glogisfit'
breakpoints(obj, h = 0.15, breaks = NULL, ic = "LWZ",
  hpc = "none", ...)

## S3 method for class 'breakpoints.glogisfit'
refit(object, ...)

## S3 method for class 'breakpoints.glogisfit'
coef(object, log = TRUE, ...)

## S3 method for class 'breakpoints.glogisfit'
fitted(object, type = c("mean", "variance", "skewness"), ...)

## S3 method for class 'breakpoints.glogisfit'
confint(object, parm = NULL, level = 0.95, breaks = NULL, 
  meat. = NULL, ...)



an object of class glogisfit.


numeric. Minimal segment size either given as fraction relative to the sample size or as an integer giving the minimal number of observations in each segment.


integer specifying the maximal number of breaks to be calculated. By default the maximal number allowed by h is used.


character specifying the default information criterion that should be employed for selecting the number of breakpoints. Default is "LWZ" (Liu-Wu-Zidek criterion, a modified BIC). Instead the classic "BIC" can be used.


a character specifying the high performance computing support. Default is "none", can be set to "foreach".


an object of class breakpoints.glogisfit as returned by the breakpoints method.


logical option in coef method indicating whether scale and shape parameters should be reported in logs (default) or the original levels.


character specifying which moments of the segmented fitted distribution should be extracted.


integer. Either parm or breaks may be set, see below.


numeric. The confidence level to be used.


function. A function for extracting the meat of a sandwich estimator from a fitted object. By default, the inverse of bread is used, i.e., a correctly specified model is assumed.


arguments passed to methods.


To test whether sequences (typically time series) of observations follow the same generalized logistic distribution, the stability of the parameters can be tested. If there is evidence for parameter instability, breakpoints can be estimated to find segments with stable parameters.

The methods from the strucchange and fxregime packages are leveraged. For testing, the generalized M-fluctuation tests from strucchange can directly be employed using gefp. For breakpoint estimation, the methods documented here provide a user interface to some internal functionality from the fxregime packages. They employ the (unexported) workhorse function gbreakpoints which is modeled after breakpoints from the strucchange package but employing user-defined estimation methods.

Optional support for high performance computing is available in the breakpoints method based on the foreach package for the dynamic programming algorithm. If hpc = "foreach" is to be used, a parallel backend should be registered before. See breakpoints for more information.


breakpoints.glogisfit returns an object of class "breakpoints.glogisfit" that inherits from "gbreakpointsfull".


Windberger T, Zeileis A (2014). Structural Breaks in Inflation Dynamics within the European Monetary Union. Eastern European Economics, 52(3), 66–88.

Zeileis A, Shah A, Patnaik I (2010). Testing, Monitoring, and Dating Structural Changes in Exchange Rate Regimes. Computational Statistics and Data Analysis, 54(6), 1696–1706. doi: 10.1016/j.csda.2009.12.005.

See Also

glogisfit, fxregimes, breakpoints


## artifical data with one structural change
x <- c(rglogis(50, -1, scale = 0.5, shape = 3), rglogis(50, 1, scale = 0.5, shape = 1))
x <- zoo(x, yearmon(seq(2000, by = 1/12, length = 100)))

## full sample estimation
gf <- glogisfit(x)

if(require("strucchange")) {

## structural change testing
gf_scus <- gefp(gf, fit = NULL)
plot(gf_scus, aggregate = FALSE)
plot(gf_scus, functional = meanL2BB)
sctest(gf_scus, functional = meanL2BB)

## breakpoint estimation
gf_bp <- breakpoints(gf)

## fitted model
lines(fitted(gf_bp, type = "mean"), col = 4)


glogis documentation built on April 19, 2022, 5:06 p.m.