print('trace statistic: ', jres.lr1) print('max eigenvalue statistic: ', jres.lr2) # 进行Johansen检验 # 输出结果 print('Eigenvalues: ', jres.eig) print('Critical values (90%, 95%, 99%) of trace statistic: ', jres.trace_stat_crit_vals) print('Critical values (90%, 95%, 99%) of max eigenvalue statistic: ', jres.max_eig_stat_crit_vals) trace statistic: [40.01598228 4.74157044] max eigenvalue statistic: [35.27441184 4.74157044] Eigenvalues: [0.98783633 0.44716534] Critical values (90%, 95%, 99%) of trace statistic: [[10.4741 12.3212 16.364 ] [ 2.9762 4.1296 6.9406]] Critical values (90%, 95%, 99%) of max eigenvalue statistic: [[ 9.4748 11.2246 15.0923] [ 2.9762 4.1296 6.9406]]什么意思
时间: 2024-01-24 10:19:03 浏览: 64
这段代码是进行 Johansen 协整检验的代码,用于检验两个或多个时间序列之间是否存在协整关系。检验结果包括以下内容:
- trace statistic 和 max eigenvalue statistic 分别是检验统计量,用于判断是否存在协整关系,如果这两个值都大于对应的临界值,则可以认为存在协整关系。
- Eigenvalues 是 Johansen 检验得到的特征值。
- Critical values (90%, 95%, 99%) of trace statistic 和 Critical values (90%, 95%, 99%) of max eigenvalue statistic 分别是 trace statistic 和 max eigenvalue statistic 的临界值,用于判断检验统计量是否显著。
相关问题
print('trace statistic: ', jres.lr1) print('max eigenvalue statistic: ', jres.lr2) # 进行Johansen检验 # 输出结果 print('Eigenvalues: ', jres.eig) print('Critical values (90%, 95%, 99%) of trace statistic: ', jres.trace_stat_crit_vals) print('Critical values (90%, 95%, 99%) of max eigenvalue statistic: ', jres.max_eig_stat_crit_vals) trace statistic: [40.01598228 4.74157044] max eigenvalue statistic: [35.27441184 4.74157044] Eigenvalues: [0.98783633 0.44716534] Critical values (90%, 95%, 99%) of trace statistic: [[10.4741 12.3212 16.364 ] [ 2.9762 4.1296 6.9406]] Critical values (90%, 95%, 99%) of max eigenvalue statistic: [[ 9.4748 11.2246 15.0923] [ 2.9762 4.1296 6.9406]]数字啥意思
这段代码是进行 Johansen 检验,用于检测多个时间序列之间是否存在协整关系。检验结果包括:
- trace statistic: 检验统计量的值,其中第一个值是用于检验一阶协整关系的统计量,第二个值是用于检验二阶协整关系的统计量。
- max eigenvalue statistic: 检验统计量的值,其中第一个值是用于检验一阶协整关系的统计量,第二个值是用于检验二阶协整关系的统计量。
- Eigenvalues: 特征值,表示序列中协整关系的数量。
- Critical values (90%, 95%, 99%) of trace statistic: 检验统计量的临界值,用于比较检验统计量的大小,判断是否存在协整关系。其中第一个数组是用于一阶协整检验的临界值,第二个数组是用于二阶协整检验的临界值。
- Critical values (90%, 95%, 99%) of max eigenvalue statistic: 同上,用于比较检验统计量的大小,判断是否存在协整关系。
什么意思print('trace statistic: ', jres.lr1) print('max eigenvalue statistic: ', jres.lr2) # 进行Johansen检验 # 输出结果 print('Eigenvalues: ', jres.eig) print('Critical values (90%, 95%, 99%) of trace statistic: ', jres.trace_stat_crit_vals) print('Critical values (90%, 95%, 99%) of max eigenvalue statistic: ', jres.max_eig_stat_crit_vals) trace statistic: [nan -0.] max eigenvalue statistic: [nan -0.] Eigenvalues: [1.5 0. ] Critical values (90%, 95%, 99%) of trace statistic: [[10.4741 12.3212 16.364 ] [ 2.9762 4.1296 6.9406]] Critical values (90%, 95%, 99%) of max eigenvalue statistic: [[ 9.4748 11.2246 15.0923] [ 2.9762 4.1296 6.9406]]
这段代码是进行 Johansen 检验,用于检验是否存在协整关系。在这个例子中,输出结果显示 trace statistic 和 max eigenvalue statistic 的值都为 nan,这意味着无法进行 Johansen 检验,可能是因为数据不足或者数据质量不好导致的。Eigenvalues 的值为 [1.5 0.],意味着存在一个特征根,但是没有协整关系。同时,Critical values 显示在 90%、95% 和 99% 的置信水平下的阈值。