Skip to content

Commit 42ccca9

Browse files
authored
Merge pull request #28 from weberse2/issue-roes-fixes
add missing exercise html file
2 parents 6743a99 + 9752f69 commit 42ccca9

File tree

11 files changed

+8002
-1633
lines changed

11 files changed

+8002
-1633
lines changed

index.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ addressed via Bayesian modelling with the `brms` package.
1616

1717
::: {.content-visible when-profile="public"}
1818
::: {.callout-tip}
19-
## Courses in Graz (Austria) September 14<sup>th</sup>, Paris (France), July 4<sup>th</sup> 2025, Göttingen (Germany), Dec 5/6<sup>th</sup> 2024 and at JSM (Portland, OR), Aug 5<sup>th</sup> 2024
19+
## Courses in Graz (Austria) September 14<sup>th</sup> 2025, Paris (France), July 4<sup>th</sup> 2025, Göttingen (Germany), Dec 5/6<sup>th</sup> 2024 and at JSM (Portland, OR), Aug 5<sup>th</sup> 2024
2020

2121
Past course we offered recently:
2222

workshops/graz2025/exercises/bamdd_graz2025_exercises.R

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1-
here::i_am("exercises/bamdd_paris2025_exercises.R")
1+
here::i_am("exercises/bamdd_graz2025_exercises.R")
22

33

44

55
## -----------------------------------------------------------------------------
66
#| eval: false
7-
## cmdstanr::check_cmdstan_toolchain(fix=T)
7+
# cmdstanr::check_cmdstan_toolchain(fix=T)
88

99

1010
## -----------------------------------------------------------------------------
1111
#| eval: false
12-
## # install.packages("remotes")
13-
## remotes::install_github("coatless-mac/macrtools")
14-
## macrtools::macos_rtools_install()
12+
# # install.packages("remotes")
13+
# remotes::install_github("coatless-mac/macrtools")
14+
# macrtools::macos_rtools_install()
1515

1616

1717
## -----------------------------------------------------------------------------
1818
#| eval: false
19-
## # in case packages are missing, please run:
20-
## install.packages(c("here", "ggplot2", "dplyr", "knitr", "brms", "posterior", "tidybayes", "RBesT", "ggrepel", "patchwork", "ggdist", "withr", "simsurv", "gt"))
19+
# # in case packages are missing, please run:
20+
# install.packages(c("here", "ggplot2", "dplyr", "knitr", "brms", "posterior", "tidybayes", "RBesT", "ggrepel", "patchwork", "ggdist", "withr", "simsurv", "gt"))
2121

2222

2323
## -----------------------------------------------------------------------------
2424
#| eval: false
25-
## bamdd_zip <- tempfile(fileext=".zip")
26-
## download.file("https://github.com/Novartis/bamdd/archive/refs/heads/main.zip", bamdd_zip)
27-
## ## extracts web-site into the users home
28-
## unzip(bamdd_zip, exdir=normalizePath("~"))
29-
## browseURL(normalizePath(file.path("~", "bamdd-main")))
30-
## # to install all dependencies needed to build the web-site, please run
31-
## source(file.path("~", "bamdd-main", "src", "install_dependencies.R"))
25+
# bamdd_zip <- tempfile(fileext=".zip")
26+
# download.file("https://github.com/Novartis/bamdd/archive/refs/heads/main.zip", bamdd_zip)
27+
# ## extracts web-site into the users home
28+
# unzip(bamdd_zip, exdir=normalizePath("~"))
29+
# browseURL(normalizePath(file.path("~", "bamdd-main")))
30+
# # to install all dependencies needed to build the web-site, please run
31+
# source(file.path("~", "bamdd-main", "src", "install_dependencies.R"))
3232

3333

3434
## ----include=FALSE------------------------------------------------------------
35-
here::i_am("exercises/bamdd_paris2025_exercises.qmd")
35+
here::i_am("exercises/bamdd_graz2025_exercises.qmd")
3636

3737

3838
## ----warning = FALSE, message = FALSE-----------------------------------------
@@ -118,7 +118,7 @@ map_mc_brms
118118

119119
## -----------------------------------------------------------------------------
120120
#| eval: false
121-
## region_model_fixed <- bf(r | trials(n) ~ 1 + region + (1 | study), family=binomial)
121+
# region_model_fixed <- bf(r | trials(n) ~ 1 + region + (1 | study), family=binomial)
122122

123123

124124
## -----------------------------------------------------------------------------
@@ -399,30 +399,30 @@ peanut |>
399399

400400
## ----peanutmodel1-------------------------------------------------------------
401401
#| eval: false
402-
## model1 <- bf( #---- YOUR CODE HERE --- # ~ E0 + Emax * dose^h/(dose^h + ED50^h),
403-
## family= #---- YOUR CODE HERE --- # ,
404-
## nlf(h ~ exp(logh)), nlf(ED50 ~ exp(logED50)),
405-
## E0 ~ 1, logED50 ~ 1, logh ~ 1, Emax ~ 1,
406-
## nl=TRUE)
407-
##
408-
## priors1 <- prior(normal(-2.944, 0.38), nlpar=E0) +
409-
## prior(normal(0, 1), nlpar=logh) +
410-
## prior(normal(0, 6), nlpar=Emax) +
411-
## prior(normal(2.7, 2.5), nlpar=logED50)
402+
# model1 <- bf( #---- YOUR CODE HERE --- # ~ E0 + Emax * dose^h/(dose^h + ED50^h),
403+
# family= #---- YOUR CODE HERE --- # ,
404+
# nlf(h ~ exp(logh)), nlf(ED50 ~ exp(logED50)),
405+
# E0 ~ 1, logED50 ~ 1, logh ~ 1, Emax ~ 1,
406+
# nl=TRUE)
407+
#
408+
# priors1 <- prior(normal(-2.944, 0.38), nlpar=E0) +
409+
# prior(normal(0, 1), nlpar=logh) +
410+
# prior(normal(0, 6), nlpar=Emax) +
411+
# prior(normal(2.7, 2.5), nlpar=logED50)
412412

413413

414414
## ----fitpeanutmodel1----------------------------------------------------------
415415
#| eval: false
416-
## brmfit1 <- brm(
417-
## formula = model1,
418-
## prior = priors1,
419-
## data = summarize(peanut, y=sum(CRIT1FL=="Y"), n=n(), .by=c(TRT01P, dose))
420-
## )
416+
# brmfit1 <- brm(
417+
# formula = model1,
418+
# prior = priors1,
419+
# data = summarize(peanut, y=sum(CRIT1FL=="Y"), n=n(), .by=c(TRT01P, dose))
420+
# )
421421

422422

423423
## -----------------------------------------------------------------------------
424424
#| eval: false
425-
## tibble(dose = seq(0, 300, 1), n=1) |> tidybayes::add_epred_rvars(brmfit1)
425+
# tibble(dose = seq(0, 300, 1), n=1) |> tidybayes::add_epred_rvars(brmfit1)
426426

427427

428428
## ----sol_peanutmodel1---------------------------------------------------------

0 commit comments

Comments
 (0)