・2010-10-05
http://www31.atwiki.jp/waseda2bun/pages/93.html
の講義のRver
|
a <- read.table("20101005.csv",sep=",",skip=1);a a <- data.frame(y, x, z) |
・結果
Call: lm(formula = y ~ ., data = data.frame(y, x, z)) Coefficients: (Intercept) x z -21.913 -1.127 2.487 |
| > summary(ans1) Call: lm(formula = y ~ ., data = data.frame(y, x, z)) Residuals: Min 1Q Median 3Q Max -0.23172 -0.07829 -0.01572 0.07121 0.29732 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -21.9128 1.6908 -12.960 1.03e-15 *** x -1.1266 0.3973 -2.836 0.0072 ** z 2.4869 0.1287 19.327 < 2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.1155 on 39 degrees of freedom Multiple R-squared: 0.9697, Adjusted R-squared: 0.9682 F-statistic: 624.2 on 2 and 39 DF, p-value: < 2.2e-16 |