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 20:19:01 浏览: 19
这段代码是进行 Johansen 检验的,用于检验多个时间序列之间是否存在协整关系。具体来说,代码输出了以下内容:
- trace statistic: Johansen 检验的 trace 统计量,包含两个值,分别对应两个时间序列的统计量;
- max eigenvalue statistic: Johansen 检验的最大特征值统计量,同样包含两个值,分别对应两个时间序列的统计量;
- Eigenvalues: Johansen 检验得到的特征值,同样包含两个值,对应两个时间序列的特征值;
- Critical values (90%, 95%, 99%) of trace statistic: trace 统计量的临界值,分别对应置信度为 90%、95% 和 99%。第一行对应一阶协整关系的临界值,第二行对应二阶协整关系的临界值;
- Critical values (90%, 95%, 99%) of max eigenvalue statistic: 最大特征值统计量的临界值,同样分别对应置信度为 90%、95% 和 99%。第一行对应一阶协整关系的临界值,第二行对应二阶协整关系的临界值。
根据 Johansen 检验的结果,可以判断两个时间序列之间是否存在协整关系,以及协整关系的阶数。
相关问题
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% 的置信水平下的阈值。