Moved small solution to solutions book
[ou-jupyter-r-demo.git] / section5.1solutions.ipynb
index 1858975e99e073e13c51d6de4032e599c4252192..c6cf696cbf8534846d991a68fff057c160172693 100644 (file)
     "source('plot_extensions.R')"
    ]
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "## Exercise 5.1"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "rubber <- read.csv('rubber.csv')"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "hidden": true,
+    "solution2": "hidden"
+   },
+   "outputs": [],
+   "source": [
+    "fit.s <- lm(loss ~ strength, data = rubber)\n",
+    "summary(fit.s)\n",
+    "anova(fit.s)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "ggplotRegression(fit.s)"
+   ]
+  },
   {
    "cell_type": "markdown",
    "metadata": {},