File: sctest.Fstats.Rd

package info (click to toggle)
strucchange 1.5-1-2
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 1,164 kB
  • sloc: makefile: 1
file content (68 lines) | stat: -rw-r--r-- 2,566 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
\name{sctest.Fstats}
\alias{sctest.Fstats}
\title{supF-, aveF- and expF-Test}
\description{Performs the supF-, aveF- or expF-test}
\usage{
\method{sctest}{Fstats}(x, type = c("supF", "aveF", "expF"),
    asymptotic = FALSE, ...)
}
\arguments{
 \item{x}{an object of class \code{"Fstats"}.}
 \item{type}{a character string specifying which test will be performed.}
 \item{asymptotic}{logical. Only necessary if \code{x} contains just a single F
     statistic and type is \code{"supF"} or \code{"aveF"}. If then set to
     \code{TRUE} the asymptotic (chi-square) distribution instead of the exact
     (F) distribution will be used to compute the p value.}
 \item{...}{currently not used.}
}

\details{If \code{x} contains just a single F statistic and type is
\code{"supF"} or \code{"aveF"} the Chow test will be performed.

The original GAUSS code for computing the p values of the supF-, aveF- and
expF-test was written by Bruce Hansen and is available from
\url{http://www.ssc.wisc.edu/~bhansen/}. R port by Achim Zeileis.
}

\value{
  An object of class \code{"htest"} containing:
  \item{statistic}{the test statistic,}
  \item{p.value}{the corresponding p value,}
  \item{method}{a character string with the method used,}
  \item{data.name}{a character string with the data name.}
}

\references{
Andrews D.W.K. (1993), Tests for parameter instability and structural
change with unknown change point, \emph{Econometrica}, \bold{61}, 821-856.

Andrews D.W.K., Ploberger W. (1994), Optimal tests when a nuisance parameter
is present only under the alternative, \emph{Econometrica}, \bold{62}, 1383-1414.

Hansen B. (1992), Tests for parameter instability in regressions with I(1)
processes, \emph{Journal of Business & Economic Statistics}, \bold{10}, 321-335.

Hansen B. (1997), Approximate asymptotic p values for structural-change
tests, \emph{Journal of Business & Economic Statistics}, \bold{15}, 60-67. }

\seealso{\code{\link{Fstats}}, \code{\link{plot.Fstats}}}

\examples{
## Load dataset "nhtemp" with average yearly temperatures in New Haven
data(nhtemp)
## plot the data
plot(nhtemp)

## test the model null hypothesis that the average temperature remains
## constant over the years for potential break points between 1941
## (corresponds to from = 0.5) and 1962 (corresponds to to = 0.85)
## compute F statistics
fs <- Fstats(nhtemp ~ 1, from = 0.5, to = 0.85)
## plot the F statistics
plot(fs, alpha = 0.01)
## and the corresponding p values
plot(fs, pval = TRUE, alpha = 0.01)
## perform the aveF test
sctest(fs, type = "aveF")
}
\keyword{htest}