Class BoxPierce
- java.lang.Object
-
- dev.nm.stat.test.HypothesisTest
-
- dev.nm.stat.test.timeseries.portmanteau.BoxPierce
-
- Direct Known Subclasses:
LjungBox
@Deprecated public class BoxPierce extends HypothesisTest
Deprecated.useLjungBox
The Box-Pierce test (named for George E. P. Box and David A. Pierce) is a portmanteau test for autocorrelated errors. A portmanteau test tests whether any of a group of autocorrelations of a time series are different from zero. The Box-Pierce statistic is computed as the weighted sum of squares of a sequence of autocorrelations. The R equivalent function isBox.test
.
-
-
Constructor Summary
Constructors Constructor Description BoxPierce(double[] x, int lag, int fitdf)
Deprecated.Perform the Box-Pierce test to check auto-correlation in a time series.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getAlternativeHypothesis()
Deprecated.Get the description of the alternative hypothesis.String
getNullHypothesis()
Deprecated.Get a description of the null hypothesis.double
pValue()
Deprecated.Get the p-value for the test statistics.double
statistics()
Deprecated.Get the test statistics.-
Methods inherited from class dev.nm.stat.test.HypothesisTest
isNullRejected, nGroups, nObs, oneSidedPvalue
-
-
-
-
Constructor Detail
-
BoxPierce
public BoxPierce(double[] x, int lag, int fitdf)
Deprecated.Perform the Box-Pierce test to check auto-correlation in a time series.- Parameters:
x
- a univariate time serieslag
- the number of lags to checkfitdf
- the degrees of freedom to be subtracted ifx
is a series of residuals
-
-
Method Detail
-
getNullHypothesis
public String getNullHypothesis()
Deprecated.Description copied from class:HypothesisTest
Get a description of the null hypothesis.- Specified by:
getNullHypothesis
in classHypothesisTest
- Returns:
- the null hypothesis description
- See Also:
- Wikipedia: Null hypothesis
-
getAlternativeHypothesis
public String getAlternativeHypothesis()
Deprecated.Description copied from class:HypothesisTest
Get the description of the alternative hypothesis.- Specified by:
getAlternativeHypothesis
in classHypothesisTest
- Returns:
- the alternative hypothesis description
- See Also:
- Wikipedia: Alternative hypothesis
-
statistics
public double statistics()
Deprecated.Description copied from class:HypothesisTest
Get the test statistics.- Specified by:
statistics
in classHypothesisTest
- Returns:
- the test statistics
- See Also:
- Wikipedia: Test statistic
-
pValue
public double pValue()
Deprecated.Description copied from class:HypothesisTest
Get the p-value for the test statistics.- Specified by:
pValue
in classHypothesisTest
- Returns:
- the p-value
- See Also:
- Wikipedia: P-value
-
-