fxregimes {fxregime} | R Documentation |
Confidence intervals for estimated changes/breaks between exchange rate regimes.
## S3 method for class 'fxregimes': confint(object, parm = NULL, level = 0.95, breaks = NULL, meat. = NULL, ...)
object |
An object of class "fxregimes" as fitted by fxregimes . |
parm |
integer. Either parm or breaks may be set, see below. |
level |
numeric. The confidence level to be used. |
breaks |
integer. The number of breaks to be extracted from object for
which confidence intervals should be computed. |
meat. |
function. A function for extracting the meat of a sandwich estimator
from a fxlm object. By default, the inverse of
bread is used, i.e., a correctly specified model is assumed. |
... |
currently not used. |
As the breakpoints are integers (observation numbers) the corresponding
confidence intervals are also rounded to integers. The algorithm used
is essentially the same as described for confint.breakpointsfull
.
The same distribution function is used, just the variance components are
computed differently. Here, bread
and
meat
(or some of its HC/HAC counterparts) are
used. See Zeileis, Shah, Patnaik (2008) for more details.
An object of class "confint.fxregimes"
.
Zeileis A., Kleiber C., Krämer W., Hornik K. (2003), Testing and Dating of Structural Changes in Practice, Computational Statistics and Data Analysis, 44, 109-123.
Zeileis A., Shah A., Patnaik I. (2008), Testing, Monitoring, and Dating Structural Changes in Maximum Likelihood Models, Report 70, Department of Statistics and Mathematics, Wirtschaftsuniversitaet Wien, Research Report Series, August 2008.
fxregimes
, refit
,
fxlm
, confint.breakpointsfull
## load package and data library("fxregime") data("FXRatesCHF", package = "fxregime") ## compute returns for CNY (and explanatory currencies) ## for one year after abolishing fixed USD regime cny <- fxreturns("CNY", frequency = "daily", start = as.Date("2005-07-25"), end = as.Date("2006-07-24"), other = c("USD", "JPY", "EUR", "GBP")) ## compute all segmented regression with minimal segment size of ## h = 20 and maximal number of breaks = 5. reg <- fxregimes(CNY ~ USD + JPY + EUR + GBP, data = cny, h = 20, breaks = 5, ic = "BIC") summary(reg) ## minimum BIC is attained for 2-segment (1-break) model plot(reg) ## two regimes ## 1: tight USD peg ## 2: slightly more relaxed USD peg round(coef(reg), digits = 3) sqrt(coef(reg)[, "(Variance)"]) ## inspect associated confidence intervals ci <- confint(reg, level = 0.9) ci breakdates(ci) ## plot LM statistics along with confidence interval fm <- fxlm(CNY ~ USD + JPY + EUR + GBP, data = cny) scus <- gefp(fm, fit = NULL) plot(scus, functional = supLM(0.1)) lines(ci)