Skip to content

Commit b8a9c4b

Browse files
seabbs-botseabbs
andauthored
Fix #582: Use primarycensored dependency resolution for Stan function loading (#593)
Co-authored-by: Sam Abbott <contact@samabbott.co.uk>
1 parent 3d6ee3e commit b8a9c4b

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

NEWS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
- Added `primarycensored (>= 1.4.0)` version bound to DESCRIPTION.
99
- Updated test expectations for changed primarycensored error handling.
1010

11+
## Package
12+
13+
- Load only required primarycensored Stan functions
14+
(`primarycensored_lpmf` and ODE/distribution helpers) with
15+
`pcd_load_stan_functions(dependencies = TRUE)` instead of loading all
16+
functions. See #582.
17+
1118
## CI
1219

1320
- Extended `check-cmdstan` workflow to also check marginal model Stan syntax.

R/marginal_model.R

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,15 @@ epidist_stancode.epidist_marginal_model <- function(
374374

375375
pcd_stanvars_functions <- brms::stanvar(
376376
block = "functions",
377-
scode = primarycensored::pcd_load_stan_functions()
377+
scode = primarycensored::pcd_load_stan_functions(
378+
c(
379+
"primarycensored_lpmf",
380+
"primarycensored_ode",
381+
"dist_lcdf",
382+
"primary_lpdf"
383+
),
384+
dependencies = TRUE
385+
)
378386
)
379387

380388
stanvars_all <- stanvars_version +

0 commit comments

Comments
 (0)