From 998cadd517dc1454f9de148a7c2cf3bb715d6de1 Mon Sep 17 00:00:00 2001 From: Sebastian Funk Date: Tue, 4 Jul 2023 21:01:03 +0100 Subject: [PATCH] fix rebase errors --- R/create.R | 2 +- inst/stan/data/simulation_rt.stan | 1 - inst/stan/simulate_secondary.stan | 8 ++++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/R/create.R b/R/create.R index 10ef0e7ea..8fa6d90f5 100644 --- a/R/create.R +++ b/R/create.R @@ -562,7 +562,7 @@ create_initial_conditions <- function(data) { if (data$seeding_time > 1) { out$initial_growth <- array(rnorm(1, data$prior_growth, 0.01)) } - out$base_cov <- rnorm( + out$base_cov <- array(rnorm( n = 1, mean = convert_to_logmean(data$r_mean, data$r_sd), sd = convert_to_logsd(data$r_mean, data$r_sd) * 0.1 )) diff --git a/inst/stan/data/simulation_rt.stan b/inst/stan/data/simulation_rt.stan index 53aadcc05..3a882df2c 100644 --- a/inst/stan/data/simulation_rt.stan +++ b/inst/stan/data/simulation_rt.stan @@ -1,6 +1,5 @@ real initial_infections[seeding_time ? n : 0, 1]; // initial logged infections real initial_growth[seeding_time > 1 ? n : 0, 1]; //initial growth - int gt_dist[1]; // 0 = lognormal; 1 = gamma vector[n] R[t - seeding_time]; // reproduction number int pop; // susceptible population diff --git a/inst/stan/simulate_secondary.stan b/inst/stan/simulate_secondary.stan index 2f4c711ee..27e5271cf 100644 --- a/inst/stan/simulate_secondary.stan +++ b/inst/stan/simulate_secondary.stan @@ -49,9 +49,13 @@ generated quantities { ); // weekly reporting effect if (week_effect > 1) { - secondary = day_of_week_effect(secondary, day_of_week, to_vector(day_of_week_simplex[i])); + secondary = day_of_week_effect( + secondary, day_of_week, to_vector(day_of_week_simplex[i]) + ); } // simulate secondary reports - sim_secondary[i] = report_rng(tail(secondary, all_dates ? t : h), rep_phi[i], obs_dist); + sim_secondary[i] = report_rng( + tail(secondary, all_dates ? t : h), rep_phi[i], obs_dist + ); } }