【原创】r语言股票相关回归分析附代码数据

2018-11-27 17:03

有问题到淘宝找“大数据部落”就可以了

Read the data into R DATE OPENING.PRICE CLOSING.PRICE TRADING.VOLUME X 1 2017/6/30 25.00 24.97 59561483 NA 2 2017/6/29 25.16 25.16 70695831 NA 3 2017/6/28 25.38 25.00 94632009 NA 4 2017/6/27 26.01 25.54 119838030 NA 5 2017/6/26 24.94 26.48 171118298 NA 6 2017/6/23 21.84 24.07 125118677 NA determine the impact of the various factors Consider the marginal and bivariate distributions

有问题到淘宝找“大数据部落”就可以了

correlation analysis To see the relationships between the different variables, plot the scatter plot between the different variables

OPENING.PRICE CLOSING.PRICE TRADING.VOLUME OPENING.PRICE 1.00000000 0.9808552 0.05470954 CLOSING.PRICE 0.98085525 1.0000000 0.12394699 TRADING.VOLUME 0.05470954 0.1239470 1.00000000 有问题到淘宝找“大数据部落”就可以了

1.ols分析 regression model Regression model A mathematical model that quantitatively describes the statistical relationship. If the mathematical model of multivariate linear regression can be expressed as y = β0 + β1 * x + εi, where β0, β1, ..., βp are p + 1 parameters to be estimated, εi are independent and obey the same normal distribution N (0, σ2), y is a random variable; x can be a random variable or a non-random variable, βi is 有问题到淘宝找“大数据部落”就可以了

called a regression coefficient, and the degree of influence of the independent variable on the dependent variable. Min 1Q Median 3Q Max -124863372 -59073739 -36622088 26385921 899267553 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 20082859 53991382 0.372 0.71 OPENING.PRICE -70603816 12488065 -5.654 4.53e-08 *** CLOSING.PRICE 73613899 12386847 5.943 1.00e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 100800000 on 235 degrees of freedom Multiple R-squared: 0.1333, Adjusted R-squared: 0.1259 F-statistic: 18.06 on 2 and 235 DF, p-value: 5.037e-08 Perform a backward stepwise regression Then I use step regression to find optimal model Start: AIC=8775.09 TRADING.VOLUME ~ (DATE + OPENING.PRICE + CLOSING.PRICE) - DATE Df Sum of Sq RSS AIC 2.3885e+18 8775.1 - OPENING.PRICE 1 3.2488e+17 2.7134e+18 8803.4 - CLOSING.PRICE 1 3.5897e+17 2.7475e+18 8806.4 2.残差诊断


【原创】r语言股票相关回归分析附代码数据.doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:2014绍兴公务员面试时事热点:以公务用餐文明引领社会消费文明

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: