Skip to content

Commit 2416dfe

Browse files
committed
Deploying to gh-pages from @ dad48b2 🚀
1 parent 8c4f423 commit 2416dfe

7 files changed

Lines changed: 30 additions & 4 deletions

File tree

articles/BugReports.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

articles/GetStarted.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

articles/GetStarted.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# Get started with \`bayesian\`
22

33
``` r
4+
45
library(bayesian)
56
```
67

78
``` r
9+
810
library(recipes)
911
library(workflows)
1012
```
@@ -21,6 +23,7 @@ prepare (a recipe for) the `epilepsy` data. This data set is shipped
2123
with the `brms` package, which is automatically loaded by `bayesian`.
2224

2325
``` r
26+
2427
epi_recipe <- epilepsy |>
2528
recipe() |>
2629
update_role(count, new_role = "outcome") |>
@@ -30,6 +33,7 @@ epi_recipe <- epilepsy |>
3033
```
3134

3235
``` r
36+
3337
print(epi_recipe)
3438
```
3539

@@ -60,6 +64,7 @@ later on. In the next step, we use `bayesian` to set up a basic model
6064
structure.
6165

6266
``` r
67+
6368
epi_model <- bayesian(
6469
family = poisson()
6570
) |>
@@ -68,6 +73,7 @@ epi_model <- bayesian(
6873
```
6974

7075
``` r
76+
7177
print(epi_model)
7278
```
7379

@@ -86,6 +92,7 @@ or set it to something else that we now wanted to change, we could use
8692
the `update` method as follows
8793

8894
``` r
95+
8996
epi_model <- epi_model |>
9097
update(family = poisson())
9198
```
@@ -95,6 +102,7 @@ above defined data processing recipe and the model plus the actual model
95102
formula to be passed to the `brms` engine.
96103

97104
``` r
105+
98106
epi_workflow <- workflow() |>
99107
add_recipe(epi_recipe) |>
100108
add_model(
@@ -104,6 +112,7 @@ epi_workflow <- workflow() |>
104112
```
105113

106114
``` r
115+
107116
print(epi_workflow)
108117
```
109118

@@ -128,6 +137,7 @@ We are now ready to fit the model by calling the `fit` method with the
128137
data set we want to train the model on.
129138

130139
``` r
140+
131141
epi_workflow_fit <- epi_workflow |>
132142
fit(data = epilepsy)
133143
```
@@ -137,6 +147,7 @@ epi_workflow_fit <- epi_workflow |>
137147
## Start sampling
138148

139149
``` r
150+
140151
print(epi_workflow_fit)
141152
```
142153

@@ -176,18 +187,21 @@ print(epi_workflow_fit)
176187
To extract the parsnip model fit from the workflow
177188

178189
``` r
190+
179191
epi_fit <- epi_workflow_fit |>
180192
extract_fit_parsnip()
181193
```
182194

183195
The `brmsfit` object can be extracted as follows
184196

185197
``` r
198+
186199
epi_brmsfit <- epi_workflow_fit |>
187200
extract_fit_engine()
188201
```
189202

190203
``` r
204+
191205
class(epi_brmsfit)
192206
```
193207

@@ -199,10 +213,12 @@ the data reprocessing, which is automatically applied using the workflow
199213
preprocessor (recipe).
200214

201215
``` r
216+
202217
newdata <- epilepsy[1:5, ]
203218
```
204219

205220
``` r
221+
206222
epi_workflow_fit |>
207223
predict(
208224
new_data = newdata,
@@ -223,6 +239,7 @@ epi_workflow_fit |>
223239
To add the standard errors on the scale of the linear predictors
224240

225241
``` r
242+
226243
epi_workflow_fit |>
227244
predict(
228245
new_data = newdata,

index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ can be installed from
2121
[CRAN](https://CRAN.R-project.org/package=bayesian) using:
2222

2323
``` r
24+
2425
install.packages("bayesian")
2526
```
2627

@@ -29,13 +30,15 @@ The development version of
2930
[GitHub](https://github.com/hsbadr/bayesian) using:
3031

3132
``` r
33+
3234
install.packages("pak")
3335
pak::pkg_install("hsbadr/bayesian")
3436
```
3537

3638
## Example
3739

3840
``` r
41+
3942
library(bayesian)
4043

4144
bayesian_mod <-
@@ -57,6 +60,7 @@ For more details, [get started with
5760
To cite `bayesian` in publications, please use:
5861

5962
``` r
63+
6064
citation("bayesian")
6165
```
6266

llms.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ can be installed from
2121
[CRAN](https://CRAN.R-project.org/package=bayesian) using:
2222

2323
``` r
24+
2425
install.packages("bayesian")
2526
```
2627

@@ -29,13 +30,15 @@ The development version of
2930
[GitHub](https://github.com/hsbadr/bayesian) using:
3031

3132
``` r
33+
3234
install.packages("pak")
3335
pak::pkg_install("hsbadr/bayesian")
3436
```
3537

3638
## Example
3739

3840
``` r
41+
3942
library(bayesian)
4043

4144
bayesian_mod <-
@@ -57,6 +60,7 @@ For more details, [get started with
5760
To cite `bayesian` in publications, please use:
5861

5962
``` r
63+
6064
citation("bayesian")
6165
```
6266

pkgdown.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
pandoc: 3.1.11
1+
pandoc: 3.8.3
22
pkgdown: 2.2.0
33
pkgdown_sha: ~
44
articles:
55
BugReports: BugReports.html
66
GetStarted: GetStarted.html
7-
last_built: 2026-04-27T12:43Z
7+
last_built: 2026-05-04T13:14Z
88
urls:
99
reference: https://hsbadr.github.io/bayesian/reference
1010
article: https://hsbadr.github.io/bayesian/articles

reference/bayesian.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ call. For this type of model, the template of the fit calls are:
437437
## Examples
438438

439439
``` r
440+
440441
bayesian()
441442
#> Bayesian Model Specification (regression)
442443
#>

0 commit comments

Comments
 (0)