From 04dc3f13bec27f892011f57bd55be13e8bc236dc Mon Sep 17 00:00:00 2001 From: Kaitlyn Johnson <94390107+kaitejohnson@users.noreply.github.com> Date: Thu, 14 Nov 2024 13:28:39 -0500 Subject: [PATCH] remove sigma rt (#244) --- R/get_stan_data.R | 1 - R/initialization.R | 1 - inst/extdata/example_params.toml | 1 - inst/stan/wwinference.stan | 4 ---- 4 files changed, 7 deletions(-) diff --git a/R/get_stan_data.R b/R/get_stan_data.R index 824c7afb..a39b478e 100644 --- a/R/get_stan_data.R +++ b/R/get_stan_data.R @@ -662,7 +662,6 @@ get_stan_data <- function(input_count_data, ww_site_mod_sd_sd = params$ww_site_mod_sd_sd, inf_feedback_prior_logmean = params$infection_feedback_prior_logmean, inf_feedback_prior_logsd = params$infection_feedback_prior_logsd, - sigma_rt_prior = params$sigma_rt_prior, log_phi_g_prior_mean = params$log_phi_g_prior_mean, log_phi_g_prior_sd = params$log_phi_g_prior_sd, log_phi_mu_prior = params$log_phi_mu_prior, diff --git a/R/initialization.R b/R/initialization.R index bccee0bf..6d28e35f 100644 --- a/R/initialization.R +++ b/R/initialization.R @@ -63,7 +63,6 @@ get_inits_for_one_chain <- function(stan_data, stdev = 0.01) { ), autoreg_rt_subpop = abs(stats::rnorm(1, 0.5, 0.05)), autoreg_p_hosp = abs(stats::rnorm(1, 1 / 100, 0.001)), - sigma_rt = abs(stats::rnorm(1, 0, stdev)), i_first_obs_over_n = stats::plogis(stats::rnorm(1, logit_i_frac_est), 0.05), mean_initial_exp_growth_rate = stats::rnorm(1, 0, stdev), diff --git a/inst/extdata/example_params.toml b/inst/extdata/example_params.toml index 4f054711..18929782 100644 --- a/inst/extdata/example_params.toml +++ b/inst/extdata/example_params.toml @@ -13,7 +13,6 @@ log_scaling_factor_sd_prior = 0.5 r_prior_mean = 1 r_prior_sd = 1 -sigma_rt_prior = 0.1 dur_inf = 7 sigma_i_first_obs_prior_mode = 0 diff --git a/inst/stan/wwinference.stan b/inst/stan/wwinference.stan index aeda96f6..a9b813e1 100644 --- a/inst/stan/wwinference.stan +++ b/inst/stan/wwinference.stan @@ -94,7 +94,6 @@ data { real p_hosp_sd_logit; real p_hosp_w_sd_sd; real ww_site_mod_sd_sd; - real sigma_rt_prior; real log_phi_g_prior_mean; real log_phi_g_prior_sd; real inf_feedback_prior_logmean; @@ -150,8 +149,6 @@ parameters { // AR process on first differences in log R(t) real log_r_t_first_obs; // central log R(t) at the time of // the first observation - real sigma_rt; // magnitude of subpopulation level - // R(t) heterogeneity real autoreg_rt_subpop; real autoreg_p_hosp; matrix[n_subpops-1, n_subpops > 1 ? n_weeks : 0] error_rt_subpop; @@ -410,7 +407,6 @@ model { autoreg_p_hosp ~ beta(autoreg_p_hosp_a, autoreg_p_hosp_b); log_r_t_first_obs ~ normal(r_logmean, r_logsd); to_vector(error_rt_subpop) ~ std_normal(); - sigma_rt ~ normal(0, sigma_rt_prior); i_first_obs_over_n ~ beta(i_first_obs_over_n_prior_a, i_first_obs_over_n_prior_b); sigma_i_first_obs ~ normal(sigma_i_first_obs_prior_mode,