Skip to content

Commit

Permalink
book update
Browse files Browse the repository at this point in the history
  • Loading branch information
daslu committed Dec 12, 2024
1 parent c98e21a commit 28b3e76
Show file tree
Hide file tree
Showing 8 changed files with 780 additions and 16 deletions.
6 changes: 6 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@
<a href="./tablemath_book.regression.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Regression</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./tablemath_book.design_matrix.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Design matrices</span></span></a>
</div>
</li>
</ul>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks/chapters.edn
Original file line number Diff line number Diff line change
@@ -1 +1 @@
["regression"]
["regression" "design_matrix"]
12 changes: 11 additions & 1 deletion docs/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,19 @@
"href": "tablemath_book.regression.html",
"title": "2  Regression",
"section": "",
"text": "(ns tablemath-book.regression\n (:require [tablecloth.api :as tc]\n [scicloj.tablemath.v1.api :as tm]))\n\n\n(-&gt; {:x (range 9)}\n tc/dataset\n (tc/map-columns :y [:x] (fn [x]\n (+ -9\n (* 4 x)\n (- 2 (* x x))\n (+ (* x x))\n (rand))))\n (tm/create-design-matrix [:y]\n [[:x '(identity x)]\n [:x2 '(* x x)]\n [:x3 '(* x x x)]])\n (tm/lm {})\n tm/summary)\n\n\nResiduals:\n\n| :min | :q1 | :median | :q3 | :max |\n|-----------+-----------+-----------+----------+---------|\n| -0.324626 | -0.184119 | -0.079698 | 0.210974 | 0.51492 |\n\nCoefficients:\n\n| :name | :estimate | :stderr | :t-value | :p-value | :confidence-interval |\n|-----------+-----------+----------+------------+----------+-----------------------|\n| Intercept | -6.159093 | 0.3334 | -18.473584 | 9.0E-6 | [-7.016125 -5.302061] |\n| :x | 3.683781 | 0.384792 | 9.573439 | 2.11E-4 | [2.694642 4.67292] |\n| :x2 | 0.05938 | 0.116179 | 0.511108 | 0.631037 | [-0.239267 0.358026] |\n| :x3 | -0.003049 | 0.00953 | -0.319964 | 0.761933 | [-0.027546 0.021447] |\n\nF-statistic: 2443.203231366597 on degrees of freedom: {:residual 5, :model 3, :intercept 1}\np-value: 2.4711939383692538E-8\n\nR2: 0.999318300467437\nAdjusted R2: 0.9989092807478992\nResidual standard error: 0.3598104470688955 on 5 degrees of freedom\nAIC: 11.851611015397268\n\n\n\nsource: notebooks/tablemath_book/regression.clj",
"text": "(ns tablemath-book.regression\n (:require [tablecloth.api :as tc]\n [scicloj.tablemath.v1.api :as tm]))\n\n\n(-&gt; {:x (range 9)}\n tc/dataset\n (tc/map-columns :y [:x] (fn [x]\n (+ -9\n (* 4 x)\n (- 2 (* x x))\n (+ (* x x))\n (rand))))\n (tm/create-design-matrix [:y]\n [[:x '(identity x)]\n [:x2 '(* x x)]\n [:x3 '(* x x x)]])\n (tm/lm {})\n tm/summary)\n\n\nResiduals:\n\n| :min | :q1 | :median | :q3 | :max |\n|-----------+-----------+----------+----------+----------|\n| -0.273222 | -0.149488 | 0.012687 | 0.175313 | 0.236005 |\n\nCoefficients:\n\n| :name | :estimate | :stderr | :t-value | :p-value | :confidence-interval |\n|-----------+-----------+----------+------------+----------+-----------------------|\n| Intercept | -6.32555 | 0.211366 | -29.926928 | 1.0E-6 | [-6.868885 -5.782215] |\n| :x | 4.196959 | 0.243947 | 17.204355 | 1.2E-5 | [3.569872 4.824046] |\n| :x2 | -0.087541 | 0.073654 | -1.188544 | 0.287988 | [-0.276875 0.101793] |\n| :x3 | 0.008396 | 0.006042 | 1.389726 | 0.223314 | [-0.007134 0.023926] |\n\nF-statistic: 6146.839917174888 on degrees of freedom: {:residual 5, :model 3, :intercept 1}\np-value: 2.4642560214616083E-9\n\nR2: 0.9997289314658869\nAdjusted R2: 0.9995662903454191\nResidual standard error: 0.22810996780077147 on 5 degrees of freedom\nAIC: 3.648119488572318\n\n\n\nsource: notebooks/tablemath_book/regression.clj",
"crumbs": [
"<span class='chapter-number'>2</span>  <span class='chapter-title'>Regression</span>"
]
},
{
"objectID": "tablemath_book.design_matrix.html",
"href": "tablemath_book.design_matrix.html",
"title": "3  Design matrices",
"section": "",
"text": "(ns tablemath-book.design-matrix\n (:require [tablecloth.api :as tc]\n [scicloj.tablemath.v1.api :as tm]))\n\n\n(-&gt; {:x (range 9)}\n tc/dataset\n (tc/map-columns :y [:x] (fn [x]\n (+ -9\n (* 4 x)\n (- 2 (* x x))\n (+ (* x x))\n (rand))))\n (tm/create-design-matrix [:y]\n [[:x '(identity x)]\n [:x2 '(* x x)]\n [:x3 '(* x x x)]]))\n\n\n_unnamed [9 4]:\n\n\n\n:x\n:y\n:x2\n:x3\n\n\n\n\n0\n-6.89765794\n0\n0\n\n\n1\n-2.80998712\n1\n1\n\n\n2\n1.58012762\n4\n8\n\n\n3\n5.80536257\n9\n27\n\n\n4\n9.67215669\n16\n64\n\n\n5\n13.73237961\n25\n125\n\n\n6\n17.40165098\n36\n216\n\n\n7\n21.68844180\n49\n343\n\n\n8\n25.29683209\n64\n512\n\n\n\n\n\nsource: notebooks/tablemath_book/design_matrix.clj",
"crumbs": [
"<span class='chapter-number'>3</span>  <span class='chapter-title'>Design matrices</span>"
]
}
]
Loading

0 comments on commit 28b3e76

Please sign in to comment.