johansen的检验有着严格的前提限定,variables must be non-stationary at level but when I convert them into first differenced, they must be stationary,大意就是你的时间序列数据为一阶单整。命令的话
vecrank dep indep1 indep2, lags(2) trend(constant) levela max
其中vecrank是命令,后面直接跟你的变量,lags你应该知道,trend应该跟数据的趋势有关,括号里面根据你的需要来。后面的跟显示的信息量有关,你可以不用。