/
ag_tech.rmd
56 lines (42 loc) · 1.16 KB
/
ag_tech.rmd
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
---
title: "accessory gland model: technical details"
date: "`r format(Sys.Date(), '%d %B %Y')`"
author: "Ben Bolker and Lucas Eckert"
bibliography: corHMM.bib
output:
html_document:
code_folding: hide
toc: true
toc_depth: 2
number_sections: true
---
<!-- **fix me**: reimplement as [target markdown](https://books.ropensci.org/targets/markdown.html#markdown) ? -->
```{r setup, message=FALSE}
source("R/utils.R")
source("R/mcmc.R")
source("R/functions.R")
load_pkgs()
zmargin <- theme(panel.spacing = grid::unit(0, "lines"))
theme_set(theme_bw())
library(targets)
```
<!-- to suppress tidyverse messages, need callr_function = NULL *or* some other shenanigans -->
# Workflow
using `targets` package
```{r visnetwork, message=FALSE, echo = FALSE, eval = FALSE}
tar_visnetwork(targets_only = TRUE)
```
# Maximum likelihood estimation
Uses an enhanced version of the `corHMM` package. Additions:
- accessor methods, for convenience
- `coef()` (coefficients)
- blah
# Contrasts
\[
\begin{split}
p_c & = C p \\
\Sigma(p_c) & = C_p^{\top} \Sigma(p) C_p
\end{split}
\]
# Markov chain Monte Carlo
- Trace plots and pair plots of posterior distributions