Skip to content

Commit

Permalink
minimal project report qmd
Browse files Browse the repository at this point in the history
  • Loading branch information
avehtari committed Nov 27, 2024
1 parent 9eafe41 commit e697789
Showing 1 changed file with 93 additions and 0 deletions.
93 changes: 93 additions & 0 deletions project_work/project_report.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
title: "Bayesian Data Analysis Project"
author: "Student Name"
format:
pdf:
toc: true
number-sections: true
colorlinks: true
---

# Introduction

```{r}
#| include: false
# Setup chunk to load necessary libraries and set options
library(brms)
options(brms.backend = "cmdstanr")
library(ggplot2)
```

```{r}
#| echo: true
# This chunk is visible and will display code and output
head(npk)
```

```{r}
#| echo: true
#| results: hide
#| warning: false
#| message: false
# This chunk's code is shown and run but the output and messages are suppressed
model <- brm(yield ~ N * P * K, data = npk)
```


```{r}
#| echo: false
#| warning: false
#| results: markup
# This chunk's code is hidden, but the output is shown
summary(model)
```

# Plots

You can specify the width of a figure:
```{r}
#| out-width: "8cm"
#| echo: false
npk |>
ggplot(
aes(
x = N,
y = P,
fill = yield
)
) +
facet_grid(
cols = vars(K),
labeller = label_both
) +
geom_tile() +
coord_equal()
```


Again but smaller
```{r}
#| out-width: "3cm"
#| echo: false
npk |>
ggplot(
aes(
x = N,
y = P,
fill = yield
)
) +
facet_grid(
cols = vars(K),
labeller = label_both
) +
geom_tile() +
coord_equal()
```

0 comments on commit e697789

Please sign in to comment.