当前位置:网站首页>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) 和失业率时间序列
边栏推荐
猜你喜欢
复制带随机指针的链表——LeetCode
Web APIs BOM- 操作浏览器之综合案例
More parameter exposure of Pico 4: Pancake + color perspective, and Pro version
MSTP——多生成树(案列+配置)
Dump文件生成,内容,以及分析
[Excel knowledge and skills] Convert text numbers to numeric format
20张图,全面掌握MVCC原理!
使用mysql语句操作数据表(table)
如何破坏Excel文件,让其显示文件已损坏方法
池化技术有多牛?来,告诉你阿里的Druid为啥如此牛逼!
随机推荐
【redis】发布和订阅消息
池化技术有多牛?来,告诉你阿里的Druid为啥如此牛逼!
Mysql database installation and configuration detailed tutorial
使用 BeanUtils 做属性拷贝,性能有点拉胯!
Mysql.慢Sql
EPro-PnP: Generalized End-to-End Probabilistic Perspective-n-Points for Monocular Object Pose Est...
线上突然查询变慢怎么核查
[Excel knowledge and skills] Convert numeric format numbers to text format
url转成obj或者obj转成url的方法
Analysis of LENS CRA and SENSOR CRA Matching Problems
BEVDepth: Acquisition of Reliable Depth for Multi-view 3D Object Detection Paper Notes
HW-蓝队工作流程(1)
what is an array
分布式.性能优化
EN 12467纤维水泥平板产品—CE认证
3d打印出现stl文件物体不是流形,意味着不是水密体...解决办法
分库分表ShardingSphere-JDBC笔记整理
Which foreign language journals and conferences can be submitted for software engineering/system software/programming language?
复制带随机指针的链表——LeetCode
百战RHCE(第四十八战:运维工程师必会技-Ansible学习3-构建Ansible清单)