\HeaderA{fxtools}{Various Tools for Exchange Rate Regime Classification}{fxtools}
\aliasA{fxpegtest}{fxtools}{fxpegtest}
\keyword{regression}{fxtools}
\begin{Description}\relax
Tools for exchange rate regime classification, currently under development.
\end{Description}
\begin{Usage}
\begin{verbatim}
  fxpegtest(model, peg = NULL, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{model}] an object of class \code{"fxlm"} as returned by \code{\LinkA{fxlm}{fxlm}}.
\item[\code{peg}] character with the name of the currency the target currency is pegged to.
By default this is chosen to be the currency with the maximal absolute coefficient.
\item[\code{...}] arguments passed to \code{\LinkA{linear.hypothesis}{linear.hypothesis}}.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
These tools should help to automate exchange rate regime classification.

The first building block is the function \code{fxpegtest}, a simple convenience
interface to \code{\LinkA{linear.hypothesis}{linear.hypothesis}}. It assess the null hypothesis
that only the \code{peg} currency has coefficient \code{1} and all other 
currencies have coefficient \code{0}.
\end{Details}
\begin{References}\relax
Shah A., Zeileis A., Patnaik I. (2005), What is the New Chinese
Currency Regime?, Report 23, Department of Statistics and Mathematics,
Wirtschaftsuniversitaet Wien, Research Report Series, November 2005.

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.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{fxlm}{fxlm}}, \code{\LinkA{fxregimes}{fxregimes}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## load package and data
library("fxregime")
data("FXRatesCHF", package = "fxregime")

## compute returns for CNY (and explanatory currencies)
## after abolishing fixed USD regime until end of 2005
cny <- fxreturns("CNY", frequency = "daily",
  start = as.Date("2005-07-25"), end = as.Date("2005-12-31"),
  other = c("USD", "JPY", "EUR", "GBP"))

## estimate full-sample exchange rate regression model
fm <- fxlm(CNY ~ USD + JPY + EUR + GBP, data = cny)

## check for plain USD peg:
if(require("car")) fxpegtest(fm)
## no deviation from a plain USD peg
\end{ExampleCode}
\end{Examples}

