From 4822fa012f9b1ddcfe962da4b66b5521ded12a8e Mon Sep 17 00:00:00 2001 From: Kaitlyn Johnson Date: Fri, 25 Oct 2024 14:27:43 -0400 Subject: [PATCH] fix handling of subpops from merge, modify vignette temporarily --- R/get_stan_data.R | 4 ++-- vignettes/wwinference.Rmd | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/R/get_stan_data.R b/R/get_stan_data.R index 2329f8e2..75d84950 100644 --- a/R/get_stan_data.R +++ b/R/get_stan_data.R @@ -559,8 +559,8 @@ get_stan_data <- function(input_count_data, # This dist_matrix will not be used, only needed for stan data specs. dist_matrix <- matrix( 0, - nrow = subpop_data$n_subpops - 1, - ncol = subpop_data$n_subpops - 1 + nrow = length(ww_vals$subpop_pops) - 1, + ncol = length(ww_vals$subpop_pops) - 1 ) } if (!(corr_structure_switch %in% c(0, 1, 2))) { diff --git a/vignettes/wwinference.Rmd b/vignettes/wwinference.Rmd index 39835926..19112c10 100644 --- a/vignettes/wwinference.Rmd +++ b/vignettes/wwinference.Rmd @@ -334,6 +334,7 @@ compile the model. This can be done using the `compile_model()` function ```{r compile-model} +# temporarily compile from local to make troubleshooting faster/easier model <- wwinference::compile_model( model_filepath = here::here(file.path( "inst", "stan", "wwinference.stan"