This is a utility document to explore the stan data structure generated by brms for a variety of formulas. The goal is to understand how the data is organized so that I can write a user-friendly function for setting initial values1. Currently it’s quite opaque and cumbersome2.
-
To generate initial value, we need to know two things:
-
-
How key information about the data and predictors is structured (from the stan data)
-
Which parameters are being estimated (from the stan code)
-
-
-
-
Example init function
-
Following the example by Henrik, here’s a function that sets initial values for a simple model (in bmm, but raw brms is similar). First, we need to extract the stan data and the stan code for the parameters block:
-
-
-Code
-
pacman::p_load(here, tidyverse, brms, bmm)
-
-# setup data and model formula
-dat <- bmm::OberauerLin_2017
-dat$SetSize <-as.factor(dat$SetSize)
-formula <-bf(dev_rad ~1,
- c ~0+ SetSize + (0+ SetSize || ID),
- kappa ~1+ (1| ID))
-
-# get standata
-sdat <-get_standata(formula = formula,
-data = dat,
-model =sdmSimple())
-
-# get stan code for parameters block
-stan_code <-get_stancode(formula = formula,
-data = dat,
-model =sdmSimple())
-par_block <-str_match(as.character(stan_code),
-"(?s)parameters \\{\\n(.*?)\\}\\ntransformed")[,2]
-
-
-
The standata looks like this:
-
-
str(sdat, give.attr=F)
-
-
List of 28
- $ N : int 15200
- $ Y : num [1:15200(1d)] 0.384 -0.4538 -0.0873 0.3665 -0.0349 ...
- $ K : int 1
- $ Kc : num 0
- $ X : num [1:15200, 1] 1 1 1 1 1 1 1 1 1 1 ...
- $ K_c : int 8
- $ X_c : num [1:15200, 1:8] 0 0 0 0 1 1 0 0 0 0 ...
- $ Z_1_c_1 : num [1:15200(1d)] 0 0 0 0 1 1 0 0 0 0 ...
- $ Z_1_c_2 : num [1:15200(1d)] 0 0 0 0 0 0 0 0 1 0 ...
- $ Z_1_c_3 : num [1:15200(1d)] 0 1 0 0 0 0 1 0 0 0 ...
- $ Z_1_c_4 : num [1:15200(1d)] 0 0 0 0 0 0 0 0 0 0 ...
- $ Z_1_c_5 : num [1:15200(1d)] 0 0 1 0 0 0 0 0 0 1 ...
- $ Z_1_c_6 : num [1:15200(1d)] 0 0 0 1 0 0 0 0 0 0 ...
- $ Z_1_c_7 : num [1:15200(1d)] 1 0 0 0 0 0 0 0 0 0 ...
- $ Z_1_c_8 : num [1:15200(1d)] 0 0 0 0 0 0 0 1 0 0 ...
- $ K_kappa : int 1
- $ Kc_kappa : num 0
- $ X_kappa : num [1:15200, 1] 1 1 1 1 1 1 1 1 1 1 ...
- $ Z_2_kappa_1: num [1:15200(1d)] 1 1 1 1 1 1 1 1 1 1 ...
- $ J_1 : int [1:15200(1d)] 1 1 1 1 1 1 1 1 1 1 ...
- $ J_2 : int [1:15200(1d)] 1 1 1 1 1 1 1 1 1 1 ...
- $ N_1 : int 19
- $ M_1 : int 8
- $ NC_1 : int 28
- $ N_2 : int 19
- $ M_2 : int 1
- $ NC_2 : int 0
- $ prior_only : int 0
We need to define initial values for every parameter listed in the parameters block, and get the appropriate dimensions from the stan data. Here’s a function that does this:
Z_1_c_1,Z_1_c_2, … Z_1_kappa_1: random effects predictor values, vector[N] for each parameter (general form: Z_dpar)
-
J_1, J_2, … : vector[N] grouping indicator for the random effects (e.g. values of subID)
-
-
J_1 is the grouping indicator for the first random effect that appears in the formula
-
-
N_1, N_2,…: number of grouping levels for the random effects (e.g. number of unique subID values)
-
M_1, M_2…: numer of random effects coefficients (e.g. 1 if only random intercepts are included)
-
NC_1, NC_2,…: number of group-level correlations
-
-
-
-
-
Component parts of pars/inits
-
All possible parts for the sdmSimple are:
-
-
if only intercept
-
-
real[1] Intercept_c
-
real[1] Intercept_kappa
-
-
if predictors but intercept is not supressed
-
-
real[1] Intercept_c
-
real[1] Intercept_kappa
-
vector[Kc_c] b_c
-
vector[Kc_kappa] b_kappa
-
-
If predictors but intercept is supressed
-
-
vector[K_c] b_c
-
vector[K_kappa] b_kappa
-
-
If random effects are included
-
-
[M_1] sd_1
-
[M_2] sd_2
-
matrix[M_1, N_1] z_1
-
matrix[M_2, N_2] z_2
-
-
-
-
-
Steps for constructing an init function automatically
-
-
Get the names of all distributional parameters
-
Get priors on the parameters
-
Exclude any parameters that have constant priors
-
For every distributional parameter, determine if they have an intercept or not
-
Get the names of variables in the list of stan data
-
Check the stan data for the presence of
-
-
Intercept_*
-
Kc_*
-
K_*
-
M_#
-
N_#
-
-
-
alternatively maybe write a script to parse the stan code parameters block?
-
-
-
How to extract the parameters
-
I can extract the parameter names from the formula
-
-
# TODO: Need to export the family so that it is accessible for these functions
-f <- brms::bf(dev_rad ~1,
- c ~0+ setsize + (0+ setsize | subID),
- kappa ~ material*setsize + (material*setsize | subID))
-family <-configure_model(sdmSimple(),dat,f)$family
-f <- brms::bf(f, family=family)
-
-bterms <- brms::brmsterms(f)
-dpars <-names(bterms$dpars)[-1]
-ranef <- brms:::tidy_ranef(bterms, data=dat)
-
-data <- brms:::validate_data(dat, bterms = bterms)
-
-
-
-
-
-
Footnotes
-
-
-
Implementing such a function was discussed for brms here, but seems like it has not been done yet↩︎
-
for example, see how Henrik does it here - it works and I’ll use it as a starting point, but ideally I don’t want to do this manually for every model and design. Also look into the functions described here↩︎
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dev_utils/stan_data_structure.qmd b/dev_utils/stan_data_structure.qmd
deleted file mode 100644
index c14ecd10..00000000
--- a/dev_utils/stan_data_structure.qmd
+++ /dev/null
@@ -1,405 +0,0 @@
----
-title: "BRMS Stan data structure"
-author: Ven Popov
-format:
- html:
- embed-resources: true
- toc: true
-execute:
- cache: true
-editor: visual
----
-
-```{r setup, include=FALSE}
-pacman::p_load(here, tidyverse, devtools, bmm, brms)
-
-nSub <- 4
-setsize <- c(3,6,9)
-material <- c("color", "orientation")
-nTrials <- 5
-
-simParms <- expand.grid(
- subID = 1:nSub,
- setsize = setsize,
- material = material
-)
-
-library(tidyverse)
-simParms <- simParms %>%
- mutate(
- c = case_when(setsize == 3 ~ rnorm(n(), mean = 3, sd = 0.5),
- TRUE ~ rnorm(n(), mean = 2, sd = 0.5)),
- kappa = case_when(material == "color" ~ rnorm(n(), mean = 8, sd = 1.5),
- TRUE ~ rnorm(n(), mean = 6, sd = 1.5))
- )
-
-simData <- data.frame(
- subID = integer(),
- setsize = integer(),
- material = character(),
- dev_rad = numeric()
-)
-
-for (i in 1:nrow(simParms)) {
- devRad <- bmm::rsdm(n = nTrials, c = simParms$c[i], kappa = simParms$kappa[i])
-
- subData <- data.frame(
- subID = simParms$subID[i],
- setsize = simParms$setsize[i],
- material = simParms$material[i],
- dev_rad = devRad
- )
-
- simData <- rbind(simData,subData)
-}
-
-simData$setsize <- as.factor(simData$setsize)
-```
-
-::: callout-note
-This document is a work in progress
-:::
-
-## Introduction
-
-This is a utility document to explore the stan data structure generated by `brms` for a variety of formulas. The goal is to understand how the data is organized so that I can write a user-friendly function for setting initial values[^1]. Currently it's quite opaque and cumbersome[^2].
-
-[^1]: Implementing such a function was discussed for brms [here](https://github.com/paul-buerkner/brms/issues/883#issuecomment-618948473), but seems like it has not been done yet
-
-[^2]: for example, see how Henrik does it [here](http://singmann.org/wiener-model-analysis-with-brms-part-i/) - it works and I'll use it as a starting point, but ideally I don't want to do this manually for every model and design. Also look into the functions described [here](https://users.aalto.fi/~ave/casestudies/Birthdays/birthdays.html#Workflow_for_quick_iterative_model_building)
-
-To generate initial value, we need to know two things:
-
-- How key information about the data and predictors is structured (from the stan data)
-- Which parameters are being estimated (from the stan code)
-
-## Example init function
-
-Following the example by Henrik, here's a function that sets initial values for a simple model (in `bmm`, but raw `brms` is similar). First, we need to extract the stan data and the stan code for the parameters block:
-
-```{r}
-#| code-fold: true
-pacman::p_load(here, tidyverse, brms, bmm)
-
-# setup data and model formula
-dat <- bmm::OberauerLin_2017
-dat$SetSize <- as.factor(dat$SetSize)
-formula <- bf(dev_rad ~ 1,
- c ~ 0 + SetSize + (0 + SetSize || ID),
- kappa ~ 1 + (1 | ID))
-
-# get standata
-sdat <- get_standata(formula = formula,
- data = dat,
- model = sdmSimple())
-
-# get stan code for parameters block
-stan_code <- get_stancode(formula = formula,
- data = dat,
- model = sdmSimple())
-par_block <- str_match(as.character(stan_code),
- "(?s)parameters \\{\\n(.*?)\\}\\ntransformed")[,2]
-```
-
-The standata looks like this:
-
-```{r}
-str(sdat, give.attr=F)
-```
-
-And the parameters block looks like this:
-
-```{r}
-cat(par_block)
-```
-
-We need to define initial values for every parameter listed in the parameters block, and get the appropriate dimensions from the stan data. Here's a function that does this:
-
-```{r}
-initfun <- function(seed) {
- set.seed(seed)
- list(
- b_c = as.array(runif(sdat$K_c,0,2)),
- Intercept_kappa = runif(1,0,2),
- sd_1 = as.array(runif(sdat$M_1,0,1)),
- sd_2 = as.array(runif(sdat$M_2,0,1)),
- z_1 = matrix(rnorm(sdat$M_1*sdat$N_1, 0, 0.01),
- sdat$M_1, sdat$N_1),
- z_2 = matrix(rnorm(sdat$M_2*sdat$N_2, 0, 0.01),
- sdat$M_2, sdat$N_2)
- )
-}
-```
-
-This function can be used to set initial values for the model:
-
-```{r}
-initlist <- list(
- initfun(1),
- initfun(2),
- initfun(3),
- initfun(4)
-)
-```
-
-and then we would run the model as
-
-``` r
-fit_model(formula, dat, sdmSimple(),
- parallel=T, init=initlist, backend='cmdstanr')
-```
-
-But I don't want to code this initfun for every possible design and model.
-
-## Formula generation
-
-Generate a bunch of different formulas:
-
-```{r ff-gen}
-#| code-fold: true
-dat <- simData
-ff <- list()
-
-i=1
-
-ff[[i]] <- brms::bf(dev_rad ~ 1,
- c ~ 1,
- kappa ~ 1); i=i+1
-ff[[i]] <- brms::bf(dev_rad ~ 1,
- c ~ setsize,
- kappa ~ 1); i=i+1
-ff[[i]] <- brms::bf(dev_rad ~ 1,
- c ~ 0 + setsize,
- kappa ~ 1); i=i+1
-ff[[i]] <- brms::bf(dev_rad ~ 1,
- c ~ 0 + setsize,
- kappa ~ material); i=i+1
-ff[[i]] <- brms::bf(dev_rad ~ 1,
- c ~ 0 + setsize*material,
- kappa ~ material); i=i+1
-ff[[i]] <- brms::bf(dev_rad ~ 1,
- c ~ 0 + setsize*material,
- kappa ~ setsize*material); i=i+1
-ff[[i]] <- brms::bf(dev_rad ~ 1,
- c ~ 1 + (1|subID),
- kappa ~ 1); i=i+1
-ff[[i]] <- brms::bf(dev_rad ~ 1,
- c ~ 1,
- kappa ~ 1 + (1|subID)); i=i+1
-ff[[i]] <- brms::bf(dev_rad ~ 1,
- c ~ 1 + (1|subID),
- kappa ~ 1 + (1|subID)); i=i+1
-ff[[i]] <- brms::bf(dev_rad ~ 1,
- c ~ 1 + (1|p1|subID),
- kappa ~ 1 + (1|p1|subID)); i=i+1
-ff[[i]] <- brms::bf(dev_rad ~ 1,
- c ~ 0 + setsize + (1 | subID),
- kappa ~ material + (1 | subID)); i=i+1
-ff[[i]] <- brms::bf(dev_rad ~ 1,
- c ~ 0 + setsize + (0 + setsize | subID),
- kappa ~ material + (material | subID)); i=i+1
-ff[[i]] <- brms::bf(dev_rad ~ 1,
- c ~ 0 + setsize + (0 + setsize | subID),
- kappa ~ material*setsize + (material | subID)); i=i+1
-ff[[i]] <- brms::bf(dev_rad ~ 1,
- c ~ 0 + setsize + (0 + setsize | subID),
- kappa ~ material*setsize + (material*setsize | subID)); i=i+1
-ff[[i]] <- brms::bf(dev_rad ~ 1,
- c ~ 0 + setsize + (0 + setsize | subID),
- kappa ~ 0 + material*setsize + (0 + material*setsize | subID)); i=i+1
-```
-
-## Stan data
-
-Extract the standata for each formula:
-
-```{r get_standata}
-# get standata
-sdat <- list()
-for (i in 1:length(ff)) {
- sdat[[i]] <- get_standata(formula = ff[[i]],
- data = dat,
- model = sdmSimple())
-}
-
-# get stan code
-stan_code <- list()
-pars_block <- list()
-for (i in 1:length(ff)) {
- stan_code[[i]] <- get_stancode(formula = ff[[i]],
- data = dat,
- model = sdmSimple())
- pars_block[[i]] <- str_match(as.character(stan_code[[i]]),
- "(?s)parameters \\{\\n(.*?)\\}\\ntransformed")[,2]
-}
-```
-
-Here's the structure for each formula:
-
-::: panel-tabset
-```{r print_standata}
-#| results: asis
-# print standata structure
-for (i in 1:length(sdat)) {
- cat("## Formula ", i, "\n")
- cat("### Data pars\n\n")
-
- cat(
- "* nSub: 4\n",
- "* setsize: 3 levels (3,6,9)\n",
- '* material: 2 levels ("color", "orientation")\n',
- '* nTrials: 5\n',
- '* Total obs: 120\n\n',
- sep = ""
- )
-
- cat("### Formula\n\n")
- cat("``` r\n")
- brms:::print.brmsformula(ff[[i]])
- cat("```\n\n")
-
- cat("### Stan code (parameters block)\n\n")
- cat("``` r\n")
- cat(pars_block[[i]])
- cat("\n\n")
- cat("```\n\n")
-
- cat("### Stan data structure\n\n")
- cat("``` r\n")
- str(sdat[[i]],3)
- cat("\n\n")
- cat("```\n\n")
-
-}
-```
-:::
-
-### Explanation of stan data structure
-
-Always present:
-
-- `N`: total number of observations
-- `Y`: vector\[N\] of responses
-- `K`, `K_c`, `K_kappa`: number of predictors for each parameter (general form: `K_dpar`)
-- `Kc`, `Kc_c`, `Kc_kappa`: number of centered predictors for each parameter. (general form: `Kc_dpar`)
- - argument missing if intercept is supressed
- - `K_dpar`-1 if intercept is included
-- `X`, `X_c`, `X_kappa`: population-level design matrix\[N, K_dpar\] for each parameter (general form: `X_dpar`)
- - colnames are the names of the predictors as they would appear in the model fit, e.g.:
- - `r colnames(sdat[[6]]$X_kappa)`
- - `r colnames(sdat[[6]]$X_c)`
-
-Only present if random effects are included:
-
-- `Z_1_c_1`,`Z_1_c_2`, ... `Z_1_kappa_1`: random effects predictor values, vector\[N\] for each parameter (general form: `Z_dpar`)
-- `J_1`, `J_2`, ... : vector\[N\] grouping indicator for the random effects (e.g. values of subID)
- - `J_1` is the grouping indicator for the first random effect that appears in the formula
-- `N_1`, `N_2`,...: number of grouping levels for the random effects (e.g. number of unique subID values)
-- `M_1`, `M_2`...: numer of random effects coefficients (e.g. 1 if only random intercepts are included)
-- `NC_1`, `NC_2`,...: number of group-level correlations
-
-## Component parts of pars/inits
-
-All possible parts for the sdmSimple are:
-
-- [**if only intercept**]{.underline}
- - real\[1\] Intercept_c
- - real\[1\] Intercept_kappa
-- [**if predictors but intercept is not supressed**]{.underline}
- - real\[1\] Intercept_c
- - real\[1\] Intercept_kappa
- - vector\[Kc_c\] b_c
- - vector\[Kc_kappa\] b_kappa
-- [**If predictors but intercept is supressed**]{.underline}
- - vector\[K_c\] b_c
- - vector\[K_kappa\] b_kappa
-- [**If random effects are included**]{.underline}
- - \[M_1\] sd_1
- - \[M_2\] sd_2
- - matrix\[M_1, N_1\] z_1
- - matrix\[M_2, N_2\] z_2
-
-## Steps for constructing an init function automatically
-
-1. Get the names of all distributional parameters
-2. Get priors on the parameters
-3. Exclude any parameters that have constant priors
-4. For every distributional parameter, determine if they have an intercept or not
-5. Get the names of variables in the list of stan data
-6. Check the stan data for the presence of
- 1. Intercept\_\*
- 2. Kc\_\*
- 3. K\_\*
- 4. M\_#
- 5. N\_#
-
-alternatively maybe write a script to parse the stan code parameters block?
-
-## How to extract the parameters
-
-I can extract the parameter names from the formula
-
-```{r}
-# TODO: Need to export the family so that it is accessible for these functions
-f <- brms::bf(dev_rad ~ 1,
- c ~ 0 + setsize + (0 + setsize | subID),
- kappa ~ material*setsize + (material*setsize | subID))
-family <- configure_model(sdmSimple(),dat,f)$family
-f <- brms::bf(f, family=family)
-
-bterms <- brms::brmsterms(f)
-dpars <- names(bterms$dpars)[-1]
-ranef <- brms:::tidy_ranef(bterms, data=dat)
-
-data <- brms:::validate_data(dat, bterms = bterms)
-```
-
-
-
-```{r, include=FALSE, eval=FALSE}
-c_terms <- bterms$dpars[['c']]
-kappa_terms <- bterms$dpars[['kappa']]
-
-has_intercept <- function (formula)
-{
- if (is.terms(formula)) {
- out <- as.logical(attr(formula, "intercept"))
- }
- else {
- formula <- as.formula(formula)
- try_terms <- try(terms(formula), silent = TRUE)
- if (is_try_error(try_terms)) {
- out <- FALSE
- }
- else {
- out <- as.logical(attr(try_terms, "intercept"))
- }
- }
- out
-}
-
-```
-
-```{r, include=FALSE, eval=FALSE}
-#brms:::stan_fe
-
-
-
-bterms <- kappa_terms
-
-
-fixef <- colnames(brms:::data_fe(bterms, data)$X)
-center_X <- brms:::stan_center_X(bterms)
-ct <- brms:::str_if(center_X, "c")
-if (center_X) {
- fixef <- setdiff(fixef, "Intercept")
-}
-px <- brms:::check_prefix(bterms)
-p <- brms:::usc(brms:::combine_prefix(px))
-if (length(fixef)) {
- b_type <- glue::glue("vector[K{ct}{p}]")
-}
-
-
-cat(brms:::stan_fe(kappa_terms,data=dat, normalize=T, prior=get_model_prior(f, dat, sdmSimple()), primitive=T)$par)
-```
diff --git a/dev_utils/stan_data_structure_cache/html/__packages b/dev_utils/stan_data_structure_cache/html/__packages
deleted file mode 100644
index 106afb73..00000000
--- a/dev_utils/stan_data_structure_cache/html/__packages
+++ /dev/null
@@ -1,16 +0,0 @@
-here
-tidyverse
-ggplot2
-tibble
-tidyr
-readr
-purrr
-dplyr
-stringr
-forcats
-lubridate
-usethis
-devtools
-bmm
-Rcpp
-brms
diff --git a/dev_utils/stan_data_structure_cache/html/ff-gen_d2cc4136c9554faf6ea6be868e1db5e5.RData b/dev_utils/stan_data_structure_cache/html/ff-gen_d2cc4136c9554faf6ea6be868e1db5e5.RData
deleted file mode 100644
index 4d7b31fc..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/ff-gen_d2cc4136c9554faf6ea6be868e1db5e5.RData and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/ff-gen_d2cc4136c9554faf6ea6be868e1db5e5.rdb b/dev_utils/stan_data_structure_cache/html/ff-gen_d2cc4136c9554faf6ea6be868e1db5e5.rdb
deleted file mode 100644
index 07e9307f..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/ff-gen_d2cc4136c9554faf6ea6be868e1db5e5.rdb and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/ff-gen_d2cc4136c9554faf6ea6be868e1db5e5.rdx b/dev_utils/stan_data_structure_cache/html/ff-gen_d2cc4136c9554faf6ea6be868e1db5e5.rdx
deleted file mode 100644
index 0de2d3b5..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/ff-gen_d2cc4136c9554faf6ea6be868e1db5e5.rdx and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/get_stancode_df9d5f1d975a19a4c88db34785e8f558.RData b/dev_utils/stan_data_structure_cache/html/get_stancode_df9d5f1d975a19a4c88db34785e8f558.RData
deleted file mode 100644
index 41672e0e..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/get_stancode_df9d5f1d975a19a4c88db34785e8f558.RData and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/get_stancode_df9d5f1d975a19a4c88db34785e8f558.rdb b/dev_utils/stan_data_structure_cache/html/get_stancode_df9d5f1d975a19a4c88db34785e8f558.rdb
deleted file mode 100644
index 6d1e836c..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/get_stancode_df9d5f1d975a19a4c88db34785e8f558.rdb and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/get_stancode_df9d5f1d975a19a4c88db34785e8f558.rdx b/dev_utils/stan_data_structure_cache/html/get_stancode_df9d5f1d975a19a4c88db34785e8f558.rdx
deleted file mode 100644
index 1681c995..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/get_stancode_df9d5f1d975a19a4c88db34785e8f558.rdx and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/get_standata_125661b2903f52b74202fc59f5417acb.RData b/dev_utils/stan_data_structure_cache/html/get_standata_125661b2903f52b74202fc59f5417acb.RData
deleted file mode 100644
index e6cf16eb..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/get_standata_125661b2903f52b74202fc59f5417acb.RData and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/get_standata_125661b2903f52b74202fc59f5417acb.rdb b/dev_utils/stan_data_structure_cache/html/get_standata_125661b2903f52b74202fc59f5417acb.rdb
deleted file mode 100644
index 841353a9..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/get_standata_125661b2903f52b74202fc59f5417acb.rdb and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/get_standata_125661b2903f52b74202fc59f5417acb.rdx b/dev_utils/stan_data_structure_cache/html/get_standata_125661b2903f52b74202fc59f5417acb.rdx
deleted file mode 100644
index d6b20e1b..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/get_standata_125661b2903f52b74202fc59f5417acb.rdx and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/print_standata_e56099a6b47ed3d39868bf8b513c7650.RData b/dev_utils/stan_data_structure_cache/html/print_standata_e56099a6b47ed3d39868bf8b513c7650.RData
deleted file mode 100644
index 0e89ca5d..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/print_standata_e56099a6b47ed3d39868bf8b513c7650.RData and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/print_standata_e56099a6b47ed3d39868bf8b513c7650.rdb b/dev_utils/stan_data_structure_cache/html/print_standata_e56099a6b47ed3d39868bf8b513c7650.rdb
deleted file mode 100644
index 065e39df..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/print_standata_e56099a6b47ed3d39868bf8b513c7650.rdb and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/print_standata_e56099a6b47ed3d39868bf8b513c7650.rdx b/dev_utils/stan_data_structure_cache/html/print_standata_e56099a6b47ed3d39868bf8b513c7650.rdx
deleted file mode 100644
index 3192ba55..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/print_standata_e56099a6b47ed3d39868bf8b513c7650.rdx and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/setup_a4b6263f603e5a165a627185b2ffcabe.RData b/dev_utils/stan_data_structure_cache/html/setup_a4b6263f603e5a165a627185b2ffcabe.RData
deleted file mode 100644
index 03ad7dcb..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/setup_a4b6263f603e5a165a627185b2ffcabe.RData and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/setup_a4b6263f603e5a165a627185b2ffcabe.rdb b/dev_utils/stan_data_structure_cache/html/setup_a4b6263f603e5a165a627185b2ffcabe.rdb
deleted file mode 100644
index 950bd8cc..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/setup_a4b6263f603e5a165a627185b2ffcabe.rdb and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/setup_a4b6263f603e5a165a627185b2ffcabe.rdx b/dev_utils/stan_data_structure_cache/html/setup_a4b6263f603e5a165a627185b2ffcabe.rdx
deleted file mode 100644
index ae4534e9..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/setup_a4b6263f603e5a165a627185b2ffcabe.rdx and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-1_14c6b4dd9368f6852d1a28c050223535.RData b/dev_utils/stan_data_structure_cache/html/unnamed-chunk-1_14c6b4dd9368f6852d1a28c050223535.RData
deleted file mode 100644
index 9a473f0a..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-1_14c6b4dd9368f6852d1a28c050223535.RData and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-1_14c6b4dd9368f6852d1a28c050223535.rdb b/dev_utils/stan_data_structure_cache/html/unnamed-chunk-1_14c6b4dd9368f6852d1a28c050223535.rdb
deleted file mode 100644
index e7c85fe4..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-1_14c6b4dd9368f6852d1a28c050223535.rdb and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-1_14c6b4dd9368f6852d1a28c050223535.rdx b/dev_utils/stan_data_structure_cache/html/unnamed-chunk-1_14c6b4dd9368f6852d1a28c050223535.rdx
deleted file mode 100644
index 418109a5..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-1_14c6b4dd9368f6852d1a28c050223535.rdx and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-2_d944081f63ad8c89c80d24c28325be6e.RData b/dev_utils/stan_data_structure_cache/html/unnamed-chunk-2_d944081f63ad8c89c80d24c28325be6e.RData
deleted file mode 100644
index 7e0b46fb..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-2_d944081f63ad8c89c80d24c28325be6e.RData and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-2_d944081f63ad8c89c80d24c28325be6e.rdb b/dev_utils/stan_data_structure_cache/html/unnamed-chunk-2_d944081f63ad8c89c80d24c28325be6e.rdb
deleted file mode 100644
index e69de29b..00000000
diff --git a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-2_d944081f63ad8c89c80d24c28325be6e.rdx b/dev_utils/stan_data_structure_cache/html/unnamed-chunk-2_d944081f63ad8c89c80d24c28325be6e.rdx
deleted file mode 100644
index a97c3311..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-2_d944081f63ad8c89c80d24c28325be6e.rdx and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-3_45e2bcd3e1f2224ea912e3ddeb2b7f18.RData b/dev_utils/stan_data_structure_cache/html/unnamed-chunk-3_45e2bcd3e1f2224ea912e3ddeb2b7f18.RData
deleted file mode 100644
index 85a4197a..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-3_45e2bcd3e1f2224ea912e3ddeb2b7f18.RData and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-3_45e2bcd3e1f2224ea912e3ddeb2b7f18.rdb b/dev_utils/stan_data_structure_cache/html/unnamed-chunk-3_45e2bcd3e1f2224ea912e3ddeb2b7f18.rdb
deleted file mode 100644
index e69de29b..00000000
diff --git a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-3_45e2bcd3e1f2224ea912e3ddeb2b7f18.rdx b/dev_utils/stan_data_structure_cache/html/unnamed-chunk-3_45e2bcd3e1f2224ea912e3ddeb2b7f18.rdx
deleted file mode 100644
index a97c3311..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-3_45e2bcd3e1f2224ea912e3ddeb2b7f18.rdx and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-4_ad664068ce867a166776f83d06a4ee35.RData b/dev_utils/stan_data_structure_cache/html/unnamed-chunk-4_ad664068ce867a166776f83d06a4ee35.RData
deleted file mode 100644
index 47f61e84..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-4_ad664068ce867a166776f83d06a4ee35.RData and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-4_ad664068ce867a166776f83d06a4ee35.rdb b/dev_utils/stan_data_structure_cache/html/unnamed-chunk-4_ad664068ce867a166776f83d06a4ee35.rdb
deleted file mode 100644
index 67885b02..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-4_ad664068ce867a166776f83d06a4ee35.rdb and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-4_ad664068ce867a166776f83d06a4ee35.rdx b/dev_utils/stan_data_structure_cache/html/unnamed-chunk-4_ad664068ce867a166776f83d06a4ee35.rdx
deleted file mode 100644
index 41e1f28f..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-4_ad664068ce867a166776f83d06a4ee35.rdx and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-5_f65c3c9429d1abc427e3e798a4e299b4.RData b/dev_utils/stan_data_structure_cache/html/unnamed-chunk-5_f65c3c9429d1abc427e3e798a4e299b4.RData
deleted file mode 100644
index 5ca815c8..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-5_f65c3c9429d1abc427e3e798a4e299b4.RData and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-5_f65c3c9429d1abc427e3e798a4e299b4.rdb b/dev_utils/stan_data_structure_cache/html/unnamed-chunk-5_f65c3c9429d1abc427e3e798a4e299b4.rdb
deleted file mode 100644
index 4f348368..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-5_f65c3c9429d1abc427e3e798a4e299b4.rdb and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-5_f65c3c9429d1abc427e3e798a4e299b4.rdx b/dev_utils/stan_data_structure_cache/html/unnamed-chunk-5_f65c3c9429d1abc427e3e798a4e299b4.rdx
deleted file mode 100644
index 55418622..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-5_f65c3c9429d1abc427e3e798a4e299b4.rdx and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-6_75160aca8cc5aaa094bf88c5a7e51f59.RData b/dev_utils/stan_data_structure_cache/html/unnamed-chunk-6_75160aca8cc5aaa094bf88c5a7e51f59.RData
deleted file mode 100644
index 02abc0f1..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-6_75160aca8cc5aaa094bf88c5a7e51f59.RData and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-6_75160aca8cc5aaa094bf88c5a7e51f59.rdb b/dev_utils/stan_data_structure_cache/html/unnamed-chunk-6_75160aca8cc5aaa094bf88c5a7e51f59.rdb
deleted file mode 100644
index 4346a4e8..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-6_75160aca8cc5aaa094bf88c5a7e51f59.rdb and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-6_75160aca8cc5aaa094bf88c5a7e51f59.rdx b/dev_utils/stan_data_structure_cache/html/unnamed-chunk-6_75160aca8cc5aaa094bf88c5a7e51f59.rdx
deleted file mode 100644
index baeb0169..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-6_75160aca8cc5aaa094bf88c5a7e51f59.rdx and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-7_136a92ebd8394ce84c63c98f5c7445a9.RData b/dev_utils/stan_data_structure_cache/html/unnamed-chunk-7_136a92ebd8394ce84c63c98f5c7445a9.RData
deleted file mode 100644
index eb3dc1da..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-7_136a92ebd8394ce84c63c98f5c7445a9.RData and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-7_136a92ebd8394ce84c63c98f5c7445a9.rdb b/dev_utils/stan_data_structure_cache/html/unnamed-chunk-7_136a92ebd8394ce84c63c98f5c7445a9.rdb
deleted file mode 100644
index e69de29b..00000000
diff --git a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-7_136a92ebd8394ce84c63c98f5c7445a9.rdx b/dev_utils/stan_data_structure_cache/html/unnamed-chunk-7_136a92ebd8394ce84c63c98f5c7445a9.rdx
deleted file mode 100644
index a97c3311..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-7_136a92ebd8394ce84c63c98f5c7445a9.rdx and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-8_17df3a44712670e24e0697b0a1c1c9f1.RData b/dev_utils/stan_data_structure_cache/html/unnamed-chunk-8_17df3a44712670e24e0697b0a1c1c9f1.RData
deleted file mode 100644
index 2e90505a..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-8_17df3a44712670e24e0697b0a1c1c9f1.RData and /dev/null differ
diff --git a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-8_17df3a44712670e24e0697b0a1c1c9f1.rdb b/dev_utils/stan_data_structure_cache/html/unnamed-chunk-8_17df3a44712670e24e0697b0a1c1c9f1.rdb
deleted file mode 100644
index e69de29b..00000000
diff --git a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-8_17df3a44712670e24e0697b0a1c1c9f1.rdx b/dev_utils/stan_data_structure_cache/html/unnamed-chunk-8_17df3a44712670e24e0697b0a1c1c9f1.rdx
deleted file mode 100644
index a97c3311..00000000
Binary files a/dev_utils/stan_data_structure_cache/html/unnamed-chunk-8_17df3a44712670e24e0697b0a1c1c9f1.rdx and /dev/null differ