Package dev.nm.stat.cointegration
Class JohansenTest
- java.lang.Object
-
- dev.nm.stat.cointegration.JohansenTest
-
public class JohansenTest extends Object
The maximum number of cointegrating relations among a multivariate time series is the rank of the Π matrix. To determine the (most likely) number of cointegrating relations r, we need to check the likelihood of hypothesis of r being from 1 to the rank. Johansen provides two types of such hypothesis test statistics.- See Also:
JohansenAsymptoticDistribution.Test
-
-
Constructor Summary
Constructors Constructor Description JohansenTest(JohansenAsymptoticDistribution.Test test, JohansenAsymptoticDistribution.TrendType trend, int dim)
Construct an instance ofJohansenTest
.JohansenTest(JohansenAsymptoticDistribution.Test test, JohansenAsymptoticDistribution.TrendType trend, int dim, int nSim, int nT)
Construct an instance ofJohansenTest
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector
getStats(CointegrationMLE coint)
Get the set of likelihood ratio test statistics for testing H(r) in H(r+1).int
r(CointegrationMLE coint, double level)
Get the (most likely) order of cointegration.
-
-
-
Constructor Detail
-
JohansenTest
public JohansenTest(JohansenAsymptoticDistribution.Test test, JohansenAsymptoticDistribution.TrendType trend, int dim, int nSim, int nT)
Construct an instance ofJohansenTest
.- Parameters:
test
- the type of Johansen cointegration testtrend
- the trend typedim
- the number of (real) eigenvaluesnSim
- the number of simulationsnT
- the number of discretization levels
-
JohansenTest
public JohansenTest(JohansenAsymptoticDistribution.Test test, JohansenAsymptoticDistribution.TrendType trend, int dim)
Construct an instance ofJohansenTest
.- Parameters:
test
- the type of Johansen cointegration testtrend
- the trend typedim
- the number of (real) eigenvalues
-
-
Method Detail
-
getStats
public Vector getStats(CointegrationMLE coint)
Get the set of likelihood ratio test statistics for testing H(r) in H(r+1).- Parameters:
coint
- the results of Johansen cointegration- Returns:
- the likelihood ratio test statistics
-
r
public int r(CointegrationMLE coint, double level)
Get the (most likely) order of cointegration.- Parameters:
coint
- the results of Johansen cointegrationlevel
- the confidence level, i.e., 1 - quantile- Returns:
- the order of cointegration
-
-