
UBI社(euronext上場株)の株価推移と同社のF2Pタイトル「ブロウルハラ」のプレイヤー数推移を時系列処理でみていく。ただ軸が変わるので、右側にUBI社の株価をプロットした(単位はついてないのでそのあたりはしっかりさせる)。軸が変わっているので、ここは相関関係を紐解いたうえで回帰分析をしたほうがいいだろう(つまり、上のグラフからだけではわからない点が多い)。ふたつの数値に関して、ほぼ同じ時系列に整形したうえで、相関・回帰を見ていく。

> cor.test(braw_players,ubi_stockprize2)
Pearson's product-moment correlation
data: braw_players and ubi_stockprize2
t = 10.251, df = 69, p-value = 1.665e-15
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
0.6639825 0.8552180
sample estimates:
cor
0.776932
> plot(braw_players~ubi_stockprize2)
> result <- lm(braw_players~ubi_stockprize2)
> abline(result,col="red")
> summary(result)
Call:
lm(formula = braw_players ~ ubi_stockprize2)
Residuals:
Min 1Q Median 3Q Max
-3261.5 -1575.0 -351.9 1176.6 9901.5
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 71.49 563.42 0.127 0.899
ubi_stockprize2 107.58 10.49 10.251 1.66e-15 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2267 on 69 degrees of freedom
Multiple R-squared: 0.6036, Adjusted R-squared: 0.5979
F-statistic: 105.1 on 1 and 69 DF, p-value: 1.665e-15
相関関係は認められ、回帰結果からも両者の関係性は明確であることがわかる。帰無仮説を棄却できるだけのp値が出た。よって、両者の間には相関関係が認められると思われる。
