- {
- "cell_type": "code",
- "execution_count": 10,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "text/plain": [
- "\n",
- "Call:\n",
- "lm(formula = loss ~ strength, data = rubber)\n",
- "\n",
- "Residuals:\n",
- " Min 1Q Median 3Q Max \n",
- "-155.640 -59.919 2.795 61.221 183.285 \n",
- "\n",
- "Coefficients:\n",
- " Estimate Std. Error t value Pr(>|t|) \n",
- "(Intercept) 305.2248 79.9962 3.815 0.000688 ***\n",
- "strength -0.7192 0.4347 -1.654 0.109232 \n",
- "---\n",
- "Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1\n",
- "\n",
- "Residual standard error: 85.56 on 28 degrees of freedom\n",
- "Multiple R-squared: 0.08904,\tAdjusted R-squared: 0.0565 \n",
- "F-statistic: 2.737 on 1 and 28 DF, p-value: 0.1092\n"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "text/html": [
- "<table>\n",
- "<thead><tr><th></th><th scope=col>Df</th><th scope=col>Sum Sq</th><th scope=col>Mean Sq</th><th scope=col>F value</th><th scope=col>Pr(>F)</th></tr></thead>\n",
- "<tbody>\n",
- "\t<tr><th scope=row>strength</th><td> 1 </td><td> 20034.77</td><td>20034.772</td><td>2.736769 </td><td>0.1092317</td></tr>\n",
- "\t<tr><th scope=row>Residuals</th><td>28 </td><td>204976.59</td><td> 7320.593</td><td> NA </td><td> NA</td></tr>\n",
- "</tbody>\n",
- "</table>\n"
- ],
- "text/latex": [
- "\\begin{tabular}{r|lllll}\n",
- " & Df & Sum Sq & Mean Sq & F value & Pr(>F)\\\\\n",
- "\\hline\n",
- "\tstrength & 1 & 20034.77 & 20034.772 & 2.736769 & 0.1092317\\\\\n",
- "\tResiduals & 28 & 204976.59 & 7320.593 & NA & NA\\\\\n",
- "\\end{tabular}\n"
- ],
- "text/markdown": [
- "\n",
- "| <!--/--> | Df | Sum Sq | Mean Sq | F value | Pr(>F) | \n",
- "|---|---|\n",
- "| strength | 1 | 20034.77 | 20034.772 | 2.736769 | 0.1092317 | \n",
- "| Residuals | 28 | 204976.59 | 7320.593 | NA | NA | \n",
- "\n",
- "\n"
- ],
- "text/plain": [
- " Df Sum Sq Mean Sq F value Pr(>F) \n",
- "strength 1 20034.77 20034.772 2.736769 0.1092317\n",
- "Residuals 28 204976.59 7320.593 NA NA"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "fit <- lm(loss ~ strength, data = rubber)\n",
- "summary(fit)\n",
- "anova(fit)"
- ]
- },