当前位置:网站首页>R language multiple linear regression, ARIMA analysis of the impact of different candidates in the United States on the economic GDP time series
R language multiple linear regression, ARIMA analysis of the impact of different candidates in the United States on the economic GDP time series
2022-08-11 00:50:00 【Rio tinto client laboratory】
全文链接:http://tecdat.cn/?p=28144
原文出处:拓端数据部落公众号
作者:Yuanchang Luo
近段时间,The U.S. presidential election has drawn the attention of countries around the world.Republican candidate Donald·Trump and Democratic candidate Joe·Biden will run for president.Bipartisan candidates in financial trade、Key development areas such as economic and financial governance and prevention and control measures have different political positions and policies.Candidates with different political positions have a certain impact on the economic development of the United States and even the world,This article combines specific data,Quantitatively analyze the impact of different candidates on the development of the U.S. economy.
解决方案
任务/目标
According to the data of various indicators in the United States and the difference between the two candidates 政策,Analyze the impact on the U.S. economy.
数据源准备
Search data on US government public datasets,共 26 类, 并且用 GDP to reflect the U.S. economy.得到数据后, Because it is time series data,Hence by Lagrangian interpolation method to fill empty values.并且,Because it is the number published by the U.S. government 据集,Hence the default outlier,That is, larger and smaller values are determined by real due to historical factors,不作处理.
特征抽取
First, observe the correlation matrix between features and the phase with the dependent variable 关性,Preliminary removal 7 A very low correlation with the dependent variable and an indicator indicators with high correlation,使用剩余19as an independent variable Metrics for regression analysis.(Dropped indicators:'US personal income 中位数','个人所得税(最高)','个人所得税(最低) ','Export of goods and services','Net acquisition of financial assets','State of the labor market condition index','失业率')
建模
多元线性回归,General application with multiple characteristic indicators return the problem. in the process of multiple linear regression,In addition to considering the model AIC minimum outer,It is also necessary to consider the relationship between the independent variables among the models the effect on the dependent variable,即多重共线性,通过 VIF to remove relevant independent variables. ARIMA,It is generally used in the field of time series. ARIMA A model refers to the transformation of a non-stationary time series into a flat stable time series,然后将结果变量做自回归(AR) 和自平移(MA).
模型优化
1.通过 VIF The criterion excludes relevant independent variables:

上图为 VIF Initial and final results.进一步筛选 7 indicators to predict.
2.通过 AIC Criteria to choose the optimal model
a combination of factors t test and model AIC,通过向 The method of forward-backward selection,Choose the best regression model.



结合上图,Be confident that this regression model is performing well.
3.Time series forecasting independent variables
Due to the data released by the US government as of now 19 年,而我 们需要 21 年 1 The data for the month independent variable is predicted by times The economic impact of the election of different candidates,Hence the passage of time 序列对 5 future forecasts 5 quarterly value.
4.Quantitative effects of different policies on characteristics
Combine policies from different candidates,Can be analyzed qualitatively Indicate whether the effect on each feature increases or decreases,然后通过 平均 20 年的数据,Calculate the increase and decrease of each characteristic percent mean,In this way, the specific value of the impact can be estimated. 这样一来,Pass on historical data ARIMA 模型得到 20 year's data,Then through the different politics of each candidate The impact of the strategy on the indicator and the average historical change,就得到了 21 The specific values of each indicator in the four quarters of the year,然后通过 Equations obtained from multiple regression,预测 21 年 4 个季度的 GDP 具体数值.
项目结果
多元回归方程:y= − 0.3478 − 0.08548x 2+1.579 × 10 −7 x 10 +4.653 × 10 −5 x 14+1.565 × 10 −5 x15+1.156x 19
Combine the predicted values for each indicator,Calculate when the different candidates The impact of elections on the economy:

可以看到,The election of both candidates will have a certain boost to the U.S. economy,But Biden's election will undoubtedly improve even more, 因此可以估计,Biden has a better chance of winning this major 选.Evaluating effects cannot be based solely on economic impact,要综合考虑, It is necessary to refer to the impact of the specific policies of different candidates, And the differences between the two candidates in different parties and groups 态度.Therefore, the forecast results are only for reference.
关于作者

在此对Yuanchang Luo对本文所作的贡献表示诚挚感谢,He completed a master's degree in applied statistics at Northwestern University,Expertise in data mining、数据分析、机器学习等.

最受欢迎的见解
1.在python中使用lstm和pytorch进行时间序列预测
2.python中利用长短期记忆模型lstm进行时间序列预测分析
3.Python用RNN循环神经网络:LSTM长期记忆、GRU门循环单元、回归和ARIMA对COVID-19新冠疫情新增人数时间序列
4.Python TensorFlow循环神经网络RNN-LSTM神经网络预测股票市场价格时间序列和MSE评估准确性
6.R 语言用RNN循环神经网络 、LSTM长短期记忆网络实现时间序列长期利率预测
7.Matlab创建向量自回归(VAR)模型分析消费者价格指数 (CPI) 和失业率时间序列
边栏推荐
- 【经典排序】快速排序
- 异常:try catch finally throws throw
- 报错:Client does not support authentication protocol requested by server; consider upgrading MySQL cli
- [Excel knowledge and skills] Convert "false" date to "true" date format
- [GXYCTF2019]BabySQli
- 虚拟电厂可视化大屏,深挖痛点精准减碳
- 什么是“门”电路(电子硬件)
- 小程序onPageNotFound的坑
- Software protection scenario of NOR FLASH flash memory chip ID application
- 线上突然查询变慢怎么核查
猜你喜欢
随机推荐
22/8/9 贪心问题合集
分布式.性能优化
rhel7.0解决yum无法使用(system is not registered to Red Hat Subscription Management)
双机热备综合实验(VRRP+OSPF+VTP+NAT+DHCP+PVSTP+单臂路由)
SystemVerilog: 验证知识点点滴滴
云原生-VMware虚拟机安装Kubesphere实战(一)
报错:Client does not support authentication protocol requested by server; consider upgrading MySQL cli
分库分表ShardingSphere-JDBC笔记整理
EN 12467纤维水泥平板产品—CE认证
【考虫 六级英语】语法课笔记
Mysql数据库安装配置详细教程
【pypdf2】合并PDF、旋转、缩放、裁剪、加密解密、添加水印
Shell 文本三剑客 Sed
input输入框超出部分用省略号表示以及判断内容是否有超出(PC端)
BEVDepth: Acquisition of Reliable Depth for Multi-view 3D Object Detection 论文笔记
版本号大小的判断方法
Navicat 16-数据库工具
C#-委托的详细用法
dump_stack()
【pypdf2】安装、读取和保存、访问页面、获取文本、读写元数据、加密解密









