我正在使用 python 为我的项目制定 johansen 测试,但它没有显示结果?
im using python to work out the johansen test for my project but it is not showing result?
这是我写的代码:
from statsmodels.tsa.vector_ar.vecm import coint_johansen
import numpy as np'
x= pd.DataFrame(data['ln_bit'])
y= pd.DataFrame(data['ln_nas'])
df = pd.concat([x,y], axis=1)
coint_johansen (df, 0, 1)
输出是这样的:
有什么帮助吗?它没有显示实际结果
coint_johansen
returns 一个对象 JohansenTestResult
你可以找到更多细节 here
例如-
import datetime
import pandas as pd
import numpy as np
from statsmodels.tsa.vector_ar.vecm import coint_johansen
test_result = coint_johansen(y, 0, p)
test_result.max_eig_stat
array([200.21744043, 167.84190294, 1.76746927])
test_result.trace_stat_crit_vals
array([[27.0669, 29.7961, 35.4628],
[13.4294, 15.4943, 19.9349],
[2.7055, 3.8415, 6.6349]])
test_result.max_eig_stat
array([200.21744043, 167.84190294, 1.76746927])
test_result.max_eig_stat_crit_vals
array([[18.8928, 21.1314, 25.865],
[12.2971, 14.2639, 18.52],
[2.7055, 3.8415, 6.6349]])
这是我写的代码:
from statsmodels.tsa.vector_ar.vecm import coint_johansen
import numpy as np'
x= pd.DataFrame(data['ln_bit'])
y= pd.DataFrame(data['ln_nas'])
df = pd.concat([x,y], axis=1)
coint_johansen (df, 0, 1)
输出是这样的:
有什么帮助吗?它没有显示实际结果
coint_johansen
returns 一个对象 JohansenTestResult
你可以找到更多细节 here
例如-
import datetime
import pandas as pd
import numpy as np
from statsmodels.tsa.vector_ar.vecm import coint_johansen
test_result = coint_johansen(y, 0, p)
test_result.max_eig_stat
array([200.21744043, 167.84190294, 1.76746927])
test_result.trace_stat_crit_vals
array([[27.0669, 29.7961, 35.4628],
[13.4294, 15.4943, 19.9349],
[2.7055, 3.8415, 6.6349]])
test_result.max_eig_stat
array([200.21744043, 167.84190294, 1.76746927])
test_result.max_eig_stat_crit_vals
array([[18.8928, 21.1314, 25.865],
[12.2971, 14.2639, 18.52],
[2.7055, 3.8415, 6.6349]])