-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
* Switch default to rstan rather than cmdstanr * Import BH * Use match.arg as suggested by @jamesmbaazam * Add RcppEigen to Suggests * Change backend to cmdstanr in approximate inference vignette * Use cmdstanr for Laplace test * Remove erroneous output_dir arg * drop backend entirely as an arg * remove cmdstanr using vignettes from cran check * update cmdstan install instructions * update epidist docs * update approx-inference vignette to make it clear we are using cmdstanr and not rstan * switch ebola vignette over to cmdstanr * update test fit returns * update more fit uses in test * fix helper function * bring silence to laplace * fix epidist * get tests passing * fix CRAN check * use fewer cores * drop additional deps * drop duplicate prepping * try and use linking with instead of imports * Update vignettes/epidist.Rmd Co-authored-by: Adam Howes <[email protected]> * Update tests/testthat/test-int-latent_individual.R Co-authored-by: Adam Howes <[email protected]> * Update inst/generate_examples.R Co-authored-by: Adam Howes <[email protected]> --------- Co-authored-by: Sam <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,6 @@ | |
^doc$ | ||
^Meta$ | ||
README.Rmd | ||
^pkgdown$ | ||
^pkgdown$ | ||
^vignettes/approx-inference\.Rmd$ | ||
^vignettes/ebola\.Rmd$ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,4 @@ | ||
source("tests/testthat/setup.R") | ||
set.seed(1) | ||
prep_obs <- as_latent_individual(sim_obs) | ||
fit <- epidist(prep_obs, seed = 1) | ||
|
||
saveRDS(fit, "inst/extdata/fit.rds") | ||
prep_obs_gamma <- as_latent_individual(sim_obs_gamma) | ||
fit_gamma <- epidist( | ||
prep_obs_gamma, | ||
family = stats::Gamma(link = "log"), | ||
seed = 1 | ||
) | ||
saveRDS(fit_gamma, "inst/extdata/fit_gamma.rds") |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
on_ci <- function() { | ||
isTRUE(as.logical(Sys.getenv("CI"))) | ||
} | ||
|
||
not_on_cran <- function() { | ||
identical(Sys.getenv("NOT_CRAN"), "true") | ||
} | ||
|
||
skip_on_local <- function() { | ||
if (on_ci()) { | ||
return(invisible(TRUE)) | ||
} | ||
testthat::skip("Not on CI") | ||
} | ||
|
||
as_string_formula <- function(formula) { | ||
form <- paste(deparse(formula), collapse = " ") | ||
form <- gsub("\\s+", " ", form, perl = FALSE) | ||
return(form) | ||
} | ||
|
||
extract_normal_parameters_brms <- function(prior) { | ||
pattern <- "normal\\(([^,]+), ([^\\)]+)\\)" | ||
match <- regmatches(prior, regexec(pattern, prior)) | ||
mean <- as.numeric(match[[1]][2]) | ||
sd <- as.numeric(match[[1]][3]) | ||
return(list(mean = mean, sd = sd)) | ||
} |