print('trace statistic: ', jres.lr1) trace statistic: [17.57118751 3.05950481] print('max eigenvalue statistic: ', jres.lr2) max eigenvalue statistic: [14.5116827 3.05950481]的数值说明了什么
时间: 2023-12-06 20:40:53 浏览: 28
这些数值是关于线性回归模型的统计指标。
`jres.lr1` 是模型的 Trace 统计量,它衡量了模型中自变量对因变量的联合作用。它的值越大,说明自变量对因变量的联合作用越强。
`jres.lr2` 是模型的最大特征值统计量,它衡量了模型中自变量对因变量的最大影响。它的值越大,说明自变量对因变量的影响越强。
在这个例子中,`jres.lr1` 的值为 17.57 和 3.06,说明自变量对因变量的联合作用比较强,但第二个自变量对因变量的贡献比较小。而 `jres.lr2` 的值为 14.51 和 3.06,也显示了第二个自变量的贡献比较小。
相关问题
print('trace statistic: ', jres.lr1) print('max eigenvalue statistic: ', jres.lr2) trace statistic: [17.57118751 3.05950481] max eigenvalue statistic: [14.5116827 3.05950481]什么意思
这段代码输出了两个统计量。`trace statistic` 是迹统计量,`max eigenvalue statistic` 是最大特征值统计量。这些统计量通常用于检验矩阵是否具有单位根,即时间序列是否是平稳的。
在这里,两个统计量的值分别为 `[17.57118751, 3.05950481]` 和 `[14.5116827, 3.05950481]`。这些值的具体含义会根据具体的模型而有所不同,但通常我们会将它们与一些临界值进行比较,以确定时间序列是否具有单位根。如果统计量的值小于某个临界值,我们可以拒绝时间序列具有单位根的假设,从而认为时间序列是平稳的。
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: 同上,用于比较检验统计量的大小,判断是否存在协整关系。