有问题到淘宝找“大数据部落”就可以了
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
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库【原创】r语言股票相关回归分析附代码数据在线全文阅读。
相关推荐: