+
+
264 int max_delay, data real D,
int dist_id,
+
265 array[] real params, data real pwindow,
+
266 int primary_id, array[] real primary_params
+
+
+
269 int upper_interval = max_delay + 1;
+
270 vector[upper_interval] log_pmfs;
+
271 vector[upper_interval] log_cdfs;
+
+
+
+
275 if (D < upper_interval) {
+
276 reject(
"D must be at least max_delay + 1");
+
+
+
+
280 for (d in 1:upper_interval) {
+
+
282 d | dist_id, params, pwindow, positive_infinity(), primary_id,
+
+
+
+
+
+
288 if (D > upper_interval) {
+
+
+
+
+
293 D | dist_id, params, pwindow, positive_infinity(),
+
294 primary_id, primary_params
+
+
+
+
298 log_normalizer = log_cdfs[upper_interval];
+
+
+
+
302 log_pmfs[1] = log_cdfs[1] - log_normalizer;
+
303 for (d in 2:upper_interval) {
+
304 log_pmfs[d] = log_diff_exp(log_cdfs[d], log_cdfs[d-1]) - log_normalizer;
+
+
+
+
-
-
344 int max_delay, data real D,
int dist_id,
-
345 array[] real params, data real pwindow,
-
-
347 array[] real primary_params
-
-
-
-
351 max_delay, D, dist_id, params, pwindow, primary_id, primary_params
-
-
-
+
+
+
+
346 int max_delay, data real D,
int dist_id,
+
347 array[] real params, data real pwindow,
+
+
349 array[] real primary_params
+
+
+
+
353 max_delay, D, dist_id, params, pwindow, primary_id, primary_params
+
+
+
real primarycensored_cdf(data real d, int dist_id, array[] real params, data real pwindow, data real D, int primary_id, array[] real primary_params)
-
vector primarycensored_sone_pmf_vectorized(int max_delay, data real D, int dist_id, array[] real params, data real pwindow, int primary_id, array[] real primary_params)
-
real primarycensored_lpmf(data int d, int dist_id, array[] real params, data real pwindow, data real d_upper, data real D, int primary_id, array[] real primary_params)
-
real primarycensored_lcdf(data real d, int dist_id, array[] real params, data real pwindow, data real D, int primary_id, array[] real primary_params)
-
real primarycensored_pmf(data int d, int dist_id, array[] real params, data real pwindow, data real d_upper, data real D, int primary_id, array[] real primary_params)
-
vector primarycensored_sone_lpmf_vectorized(int max_delay, data real D, int dist_id, array[] real params, data real pwindow, int primary_id, array[] real primary_params)
+
vector primarycensored_sone_pmf_vectorized(int max_delay, data real D, int dist_id, array[] real params, data real pwindow, int primary_id, array[] real primary_params)
+
real primarycensored_lpmf(data int d, int dist_id, array[] real params, data real pwindow, data real d_upper, data real D, int primary_id, array[] real primary_params)
+
real primarycensored_lcdf(data real d, int dist_id, array[] real params, data real pwindow, data real D, int primary_id, array[] real primary_params)
+
real primarycensored_pmf(data int d, int dist_id, array[] real params, data real pwindow, data real d_upper, data real D, int primary_id, array[] real primary_params)
+
vector primarycensored_sone_lpmf_vectorized(int max_delay, data real D, int dist_id, array[] real params, data real pwindow, int primary_id, array[] real primary_params)
real primarycensored_analytical_cdf(data real d, int dist_id, array[] real params, data real pwindow, data real D, int primary_id, array[] real primary_params)
real primarycensored_analytical_lcdf(data real d, int dist_id, array[] real params, data real pwindow, data real D, int primary_id, array[] real primary_params)
int check_for_analytical(int dist_id, int primary_id)
diff --git a/stan/primarycensored__analytical__cdf_8stan_source.html b/stan/primarycensored__analytical__cdf_8stan_source.html
index c780b8f..cad8cdb 100644
--- a/stan/primarycensored__analytical__cdf_8stan_source.html
+++ b/stan/primarycensored__analytical__cdf_8stan_source.html
@@ -310,7 +310,7 @@