-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathindex.html
463 lines (414 loc) · 26.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Home · TuringGLM.jl</title><script data-outdated-warner src="assets/warner.js"></script><link rel="canonical" href="https://TuringLang.github.io/TuringGLM.jl/"/><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="assets/documenter.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="assets/themeswap.js"></script><link href="assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body>
<!-- NAVBAR START -->
<style>
html {
scroll-padding-top: calc(55px + 1rem);
}
/* Documenter css tweaks */
.docs-sidebar {
margin-top: 3.75rem;
}
#documenter {
margin-top: 3.75rem;
}
.docs-version-selector {
margin-bottom: 60px !important;
}
@media screen and (max-width: 1056px) {
.docs-version-selector {
margin-bottom: 60px !important;
}
.docs-sidebar {
margin-top: 0 !important;
}
}
/* Documenter css tweaks ends here */
:root {
--heading-color: white;
--item-color: rgb(165, 165, 165);
--primary-bg: #073c44;
--hover-color: #8faad2;
}
.ext-navigation {
position: fixed;
height: 3.75rem;
top: 0;
width: 100%;
background-color: var(--primary-bg);
z-index: 1000;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
display: flex;
align-items: center;
padding: 0 1.0625rem;
transition: transform 0.3s;
}
.ext-navbar-logo {
margin-left: 0.625rem;
}
.ext-nav-links {
display: flex;
align-items: center;
list-style-type: none;
margin: 0;
padding: 0;
flex-grow: 1;
}
.ext-nav-links li {
margin-left: 1rem !important;
}
.ext-nav-link {
color: white !important;
text-decoration: none;
font-size: 1.0625rem !important;
transition: color 0.2s ease;
cursor: pointer;
}
.ext-nav-link:hover,
.ext-navbar-item-single a:hover {
color: var(--hover-color) !important;
}
.ext-navbar-item-single a {
color: #fff !important;
}
.ext-menu-toggle {
display: none;
font-size: 1.5rem;
color: white;
cursor: pointer;
}
.ext-dropdown {
display: none;
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-template-rows: auto auto auto;
padding: 1.875rem;
position: absolute;
width: 100%;
left: 0;
background-color: #083c44;
line-height: 1.875rem;
opacity: 0;
transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
transform: translateY(-0.625rem);
}
#library-handler::after {
content: "▼";
font-size: 0.6875rem;
margin-left: 0.3125rem;
transition: transform 0.3s ease-in-out;
}
#library-handler.open::after {
content: "▲";
}
.ext-dropdown.show {
display: grid;
opacity: 1;
transform: translateY(0);
}
.ext-dropdown ul {
height: auto;
width: 12.5rem;
margin-bottom: 1.25rem;
}
.ext-dropdown ul li {
text-align: left;
}
.navbar-sub-item {
list-style: none;
}
.ext-dropdown ul a li {
color: var(--item-color);
width: 15.625rem;
border-radius: 3px;
padding: 0.125rem 0.625rem;
transition: background-color 0.2s ease;
}
.ext-dropdown ul a li:hover {
background-color: rgba(107, 107, 107, 0.5);
}
.ext-dropdown-item-heading {
color: var(--heading-color);
text-align: center;
}
/* Responsive styling */
@media (max-width: 966px) {
.ext-dropdown {
grid-template-columns: 1fr 1fr 1fr;
}
}
@media (max-width: 768px) {
.ext-nav-links {
display: none;
flex-direction: column;
width: 100%;
background-color: var(--primary-bg);
position: absolute;
top: 3.75rem;
left: 0;
padding: 0.625rem 0;
height: auto;
overflow-y: auto;
scrollbar-width: thin;
scrollbar-color: rgb(141, 141, 141) grey;
}
.ext-nav-links.show {
display: flex;
}
.ext-nav-links li {
margin: 0.625rem 0;
text-align: center;
}
.ext-menu-toggle {
display: block;
margin-left: auto;
}
.ext-navigation.hide {
transform: translateY(-3.75rem);
}
.ext-dropdown {
place-content: center;
text-align: center;
grid-template-columns: 1fr;
line-height: 1.25rem;
padding: 0.625rem;
}
.ext-dropdown ul {
width: 100%;
text-align: center;
margin-bottom: 0.3125rem;
}
.ext-dropdown ul li {
text-align: center;
}
.ext-dropdown ul a li {
width: 100%;
}
.ext-dropdown ul a li:hover {
background-color: var(--primary-bg);
color: #fff;
}
/* Modified scroll bar */
.ext-nav-links::-webkit-scrollbar {
width: 5px;
}
.ext-nav-links::-webkit-scrollbar-track {
box-shadow: inset 0 0 5px grey;
}
.ext-nav-links::-webkit-scrollbar-thumb {
background: rgb(141, 141, 141);
border-radius: 3px;
}
.ext-nav-links::-webkit-scrollbar-thumb:hover {
background: #9b9b9b;
}
}
</style>
<nav class="ext-navigation">
<a href="https://turinglang.org/">
<img src="https://turinglang.org/assets/images/turing-logo.svg" alt="Turing Logo" class="ext-navbar-logo" height="24px" width="40px">
</a>
<a style="color: white !important; font-size: 21.25px !important; margin-left: 10px;" href="https://turinglang.org/">Turing.jl</a>
<ul class="ext-nav-links">
<li>
<a class="ext-nav-link" href="https://turinglang.org/docs/tutorials/docs-00-getting-started/">Get Started</a>
</li>
<li>
<a class="ext-nav-link" href="https://turinglang.org/docs/tutorials/00-introduction/">Tutorials</a>
</li>
<li>
<p class="ext-nav-link" id="library-handler">Libraries</p>
<div class="ext-dropdown" id="ext-dropdown-items">
<ul>
<li class="ext-dropdown-item-heading">Modelling Languages</li>
<a href="https://turinglang.org/DynamicPPL.jl/">
<li>DynamicPPL</li>
</a>
<a href="https://turinglang.org/JuliaBUGS.jl/">
<li>JuliaBUGS</li>
</a>
<a href="https://turinglang.org/TuringGLM.jl/">
<li>TuringGLM</li>
</a>
</ul>
<ul>
<li class="ext-dropdown-item-heading">MCMC</li>
<a href="https://turinglang.org/AdvancedHMC.jl/">
<li>AdvancedHMC</li>
</a>
<a href="https://turinglang.org/AbstractMCMC.jl/">
<li>AbstractMCMC</li>
</a>
<a href="https://github.com/theogf/ThermodynamicIntegration.jl">
<li>ThermodynamicIntegration</li>
</a>
<a href="https://turinglang.org/AdvancedPS.jl/">
<li>AdvancedPS</li>
</a>
<a href="https://turinglang.org/SliceSampling.jl/">
<li>SliceSampling</li>
</a>
<a href="https://turinglang.org/EllipticalSliceSampling.jl/">
<li>EllipticalSliceSampling</li>
</a>
<a href="https://turinglang.org/NestedSamplers.jl/">
<li>NestedSamplers</li>
</a>
</ul>
<ul>
<li class="ext-dropdown-item-heading">Diagnostics</li>
<a href="https://turinglang.org/MCMCChains.jl/">
<li>MCMCChains</li>
</a>
<a href="https://turinglang.org/MCMCDiagnosticTools.jl/">
<li>MCMCDiagnosticTools</li>
</a>
<a href="https://turinglang.org/ParetoSmooth.jl/">
<li>ParetoSmooth</li>
</a>
</ul>
<ul>
<li class="ext-dropdown-item-heading">Gaussian Processes</li>
<a href="https://juliagaussianprocesses.github.io/AbstractGPs.jl/">
<li>AbstractGPs</li>
</a>
<a href="https://juliagaussianprocesses.github.io/KernelFunctions.jl/">
<li>KernelFunctions</li>
</a>
<a href="https://juliagaussianprocesses.github.io/ApproximateGPs.jl/">
<li>ApproximateGPs</li>
</a>
</ul>
<ul>
<li class="ext-dropdown-item-heading ext-navbar-item-single">
<a href="https://turinglang.org/Bijectors.jl/">Bijectors</a>
</li>
</ul>
<ul>
<li class="ext-dropdown-item-heading ext-navbar-item-single">
<a href="https://turinglang.org/TuringCallbacks.jl/">TuringCallbacks</a>
</li>
</ul>
<ul>
<li class="ext-dropdown-item-heading ext-navbar-item-single">
<a href="https://turinglang.org/TuringBenchmarking.jl/">TuringBenchmarking</a>
</li>
</ul>
</div>
</li>
<li>
<a class="ext-nav-link" href="https://turinglang.org/news/">News</a>
</li>
<li>
<a class="ext-nav-link" href="https://turinglang.org/team/">Team</a>
</li>
</ul>
<a href="https://x.com/TuringLang" style="margin-left: 15px; padding-top: 2px">
<svg fill="#ffffff" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32px" height="32px" viewBox="-209.92 -209.92 931.84 931.84" xml:space="preserve" stroke="#ffffff">
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
<g id="SVGRepo_iconCarrier">
<g id="7935ec95c421cee6d86eb22ecd12f847">
<path style="display: inline"
d="M459.186,151.787c0.203,4.501,0.305,9.023,0.305,13.565 c0,138.542-105.461,298.285-298.274,298.285c-59.209,0-114.322-17.357-160.716-47.104c8.212,0.973,16.546,1.47,25.012,1.47 c49.121,0,94.318-16.759,130.209-44.884c-45.887-0.841-84.596-31.154-97.938-72.804c6.408,1.227,12.968,1.886,19.73,1.886 c9.55,0,18.816-1.287,27.617-3.68c-47.955-9.633-84.1-52.001-84.1-102.795c0-0.446,0-0.882,0.011-1.318 c14.133,7.847,30.294,12.562,47.488,13.109c-28.134-18.796-46.637-50.885-46.637-87.262c0-19.212,5.16-37.218,14.193-52.7 c51.707,63.426,128.941,105.156,216.072,109.536c-1.784-7.675-2.718-15.674-2.718-23.896c0-57.891,46.941-104.832,104.832-104.832 c30.173,0,57.404,12.734,76.525,33.102c23.887-4.694,46.313-13.423,66.569-25.438c-7.827,24.485-24.434,45.025-46.089,58.002 c21.209-2.535,41.426-8.171,60.222-16.505C497.448,118.542,479.666,137.004,459.186,151.787z">
</path>
</g>
</g>
</svg>
</a>
<a href="https://github.com/TuringLang/Turing.jl">
<svg width="32px" height="32px" viewBox="-8.2 -8.2 36.40 36.40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000">
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
<g id="SVGRepo_iconCarrier">
<title>github [#142]</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke-width="0.0002" fill="none" fill-rule="evenodd">
<g id="Dribbble-Light-Preview" transform="translate(-140.000000, -7559.000000)" fill="#ffffff">
<g id="icons" transform="translate(56.000000, 160.000000)">
<path
d="M94,7399 C99.523,7399 104,7403.59 104,7409.253 C104,7413.782 101.138,7417.624 97.167,7418.981 C96.66,7419.082 96.48,7418.762 96.48,7418.489 C96.48,7418.151 96.492,7417.047 96.492,7415.675 C96.492,7414.719 96.172,7414.095 95.813,7413.777 C98.04,7413.523 100.38,7412.656 100.38,7408.718 C100.38,7407.598 99.992,7406.684 99.35,7405.966 C99.454,7405.707 99.797,7404.664 99.252,7403.252 C99.252,7403.252 98.414,7402.977 96.505,7404.303 C95.706,7404.076 94.85,7403.962 94,7403.958 C93.15,7403.962 92.295,7404.076 91.497,7404.303 C89.586,7402.977 88.746,7403.252 88.746,7403.252 C88.203,7404.664 88.546,7405.707 88.649,7405.966 C88.01,7406.684 87.619,7407.598 87.619,7408.718 C87.619,7412.646 89.954,7413.526 92.175,7413.785 C91.889,7414.041 91.63,7414.493 91.54,7415.156 C90.97,7415.418 89.522,7415.871 88.63,7414.304 C88.63,7414.304 88.101,7413.319 87.097,7413.247 C87.097,7413.247 86.122,7413.234 87.029,7413.87 C87.029,7413.87 87.684,7414.185 88.139,7415.37 C88.139,7415.37 88.726,7417.2 91.508,7416.58 C91.513,7417.437 91.522,7418.245 91.522,7418.489 C91.522,7418.76 91.338,7419.077 90.839,7418.982 C86.865,7417.627 84,7413.783 84,7409.253 C84,7403.59 88.478,7399 94,7399"
id="github-[#142]">
</path>
</g>
</g>
</g>
</g>
</svg>
</a>
<span class="ext-menu-toggle">☰</span>
</nav>
<script>
document.addEventListener("DOMContentLoaded", function () {
const menuToggle = document.querySelector(".ext-menu-toggle");
const navLinks = document.querySelector(".ext-nav-links");
const nav = document.querySelector(".ext-navigation");
const navigationHandler = document.getElementById("library-handler");
const navigationItemsContainer =
document.getElementById("ext-dropdown-items");
let lastScrollY = window.scrollY;
function setAppropriateHeight() {
if (window.innerWidth <= 768) {
const viewportHeight = window.innerHeight;
const navHeight = nav.offsetHeight;
navLinks.style.maxHeight = `${viewportHeight - navHeight}px`;
navLinks.style.overflowY = "auto";
} else {
navLinks.style.maxHeight = "";
navLinks.style.overflowY = "";
}
}
// Toggle main menu for mobile
menuToggle.addEventListener("click", () => {
navLinks.classList.toggle("show");
if (navLinks.classList.contains("show")) {
setAppropriateHeight();
// Ensure the dropdown is hidden when menu is first opened
navigationItemsContainer.style.display = "none";
navigationItemsContainer.classList.remove("show");
}
});
// Close menus if clicked outside
document.addEventListener("click", (event) => {
if (
!navLinks.contains(event.target) &&
!menuToggle.contains(event.target)
) {
navLinks.classList.remove("show");
navigationItemsContainer.classList.remove("show");
navigationHandler.classList.remove("open");
}
});
// Hide navigation bar on scroll down in mobile view
window.addEventListener("scroll", () => {
if (window.innerWidth <= 768) {
nav.classList.toggle("hide", window.scrollY > lastScrollY);
lastScrollY = window.scrollY;
}
});
// Library API script
navigationHandler.addEventListener("click", (event) => {
event.preventDefault(); // Prevent default action of the link
if (navigationItemsContainer.classList.contains("show")) {
navigationItemsContainer.classList.remove("show");
navigationHandler.classList.remove("open");
setTimeout(() => {
navigationItemsContainer.style.display = "none";
}, 500); // Match the timeout to the CSS transition duration
} else {
navigationItemsContainer.style.display = "grid";
navigationHandler.classList.add("open");
setTimeout(() => {
navigationItemsContainer.classList.add("show");
}, 10); // Delay to ensure the display change takes effect before adding class
}
setAppropriateHeight(); // Recalculate height when dropdown changes
});
// Handle window resize
window.addEventListener("resize", setAppropriateHeight);
// Initial setup
setAppropriateHeight();
});
</script>
<!-- NAVBAR END -->
<div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href><img src="assets/logo.png" alt="TuringGLM.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href>TuringGLM.jl</a></span></div><form class="docs-search" action="search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li class="is-active"><a class="tocitem" href>Home</a><ul class="internal"><li><a class="tocitem" href="#Getting-Started"><span>Getting Started</span></a></li><li><a class="tocitem" href="#Tutorials"><span>Tutorials</span></a></li></ul></li><li><span class="tocitem">Tutorials</span><ul><li><a class="tocitem" href="tutorials/linear_regression/">Linear Regression</a></li><li><a class="tocitem" href="tutorials/logistic_regression/">Logistic Regression</a></li><li><a class="tocitem" href="tutorials/poisson_regression/">Poisson Regression</a></li><li><a class="tocitem" href="tutorials/negative_binomial_regression/">Negative Binomial Regression</a></li><li><a class="tocitem" href="tutorials/robust_regression/">Robust Regression</a></li><li><a class="tocitem" href="tutorials/hierarchical_models/">Hierarchical Models</a></li><li><a class="tocitem" href="tutorials/custom_priors/">Custom Priors</a></li></ul></li><li><a class="tocitem" href="api/">API reference</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Home</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Home</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/TuringLang/TuringGLM.jl/blob/main/docs/src/index.md#" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="TuringGLM"><a class="docs-heading-anchor" href="#TuringGLM">TuringGLM</a><a id="TuringGLM-1"></a><a class="docs-heading-anchor-permalink" href="#TuringGLM" title="Permalink"></a></h1><p>Documentation for <a href="https://github.com/TuringLang/TuringGLM.jl"><code>TuringGLM</code></a>. Please <a href="https://github.com/TuringLang/TuringGLM.jl/issues/new">file an issue</a> if you run into any problems.</p><p><code>TuringGLM</code> supports Julia version 1.7+. We recommend always using it with the latest stable Julia release.</p><h2 id="Getting-Started"><a class="docs-heading-anchor" href="#Getting-Started">Getting Started</a><a id="Getting-Started-1"></a><a class="docs-heading-anchor-permalink" href="#Getting-Started" title="Permalink"></a></h2><p>TuringGLM makes easy to specify Bayesian <strong>G</strong>eneralized <strong>L</strong>inear <strong>M</strong>odels using the formula syntax and returns an instantiated <a href="https://github.com/TuringLang/Turing.jl">Turing</a> model.</p><p>Heavily inspired by <a href="https://github.com/paul-buerkner/brms/">brms</a> (uses RStan or CmdStanR) and <a href="https://github.com/bambinos/bambi">bambi</a> (uses PyMC3).</p><h3 id="@formula"><a class="docs-heading-anchor" href="#@formula"><code>@formula</code></a><a id="@formula-1"></a><a class="docs-heading-anchor-permalink" href="#@formula" title="Permalink"></a></h3><p>The <code>@formula</code> macro is extended from <a href="https://github.com/JuliaStats/StatsModels.jl"><code>StatsModels.jl</code></a> along with <a href="https://github.com/JuliaStats/MixedModels.jl"><code>MixedModels.jl</code></a> for the random-effects (a.k.a. group-level predictors).</p><p>The syntax is done by using the <code>@formula</code> macro and then specifying the dependent variable followed by a tilde <code>~</code> then the independent variables separated by a plus sign <code>+</code>.</p><p>Example:</p><pre><code class="language-julia hljs">@formula(y ~ x1 + x2 + x3)</code></pre><p>Moderations/interactions can be specified with the asterisk sign <code>*</code>, e.g. <code>x1 * x2</code>. This will be expanded to <code>x1 + x2 + x1:x2</code>, which, following the principle of hierarchy, the main effects must also be added along with the interaction effects. Here <code>x1:x2</code> means that the values of <code>x1</code> will be multiplied (interacted) with the values of <code>x2</code>.</p><p>Random-effects (a.k.a. group-level effects) can be specified with the <code>(term | group)</code> inside the <code>@formula</code>, where <code>term</code> is the independent variable and <code>group</code> is the <strong>categorical</strong> representation (i.e., either a column of <code>String</code>s or a <code>CategoricalArray</code> in <code>data</code>). You can specify a random-intercept with <code>(1 | group)</code>.</p><p>Example:</p><pre><code class="language-julia hljs">@formula(y ~ (1 | group) + x1)</code></pre><h3 id="Data"><a class="docs-heading-anchor" href="#Data">Data</a><a id="Data-1"></a><a class="docs-heading-anchor-permalink" href="#Data" title="Permalink"></a></h3><p>TuringGLM supports any <code>Tables.jl</code>-compatible data interface. The most popular ones are <code>DataFrame</code>s and <code>NamedTuple</code>s.</p><h3 id="Supported-Models"><a class="docs-heading-anchor" href="#Supported-Models">Supported Models</a><a id="Supported-Models-1"></a><a class="docs-heading-anchor-permalink" href="#Supported-Models" title="Permalink"></a></h3><p>TuringGLM supports non-hierarchical and hierarchical models. For hierarchical models, only single random-intercept hierarchical models are supported.</p><p>Currently, for likelihoods <code>TuringGLM.jl</code> supports:</p><ul><li><code>Normal</code> (the default if not specified): linear regression</li><li><code>TDist</code>: robust linear regression</li><li><code>Bernoulli</code>: logistic regression</li><li><code>Poisson</code>: Poisson count data regression</li><li><code>NegativeBinomial</code>: negative binomial robust count data regression</li></ul><h2 id="Tutorials"><a class="docs-heading-anchor" href="#Tutorials">Tutorials</a><a id="Tutorials-1"></a><a class="docs-heading-anchor-permalink" href="#Tutorials" title="Permalink"></a></h2><p>Take a look at the tutorials for all supported likelihood and models.</p><ul></ul></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="tutorials/linear_regression/">Linear Regression »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 17 September 2023 23:13">Sunday 17 September 2023</span>. Using Julia version 1.9.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>