Skip to content

Commit

Permalink
Merge pull request #162 from venpopov/documentation/153-update-oberau…
Browse files Browse the repository at this point in the history
…erlin_2017

Documentation/153 update oberauerlin 2017
  • Loading branch information
GidonFrischkorn authored Mar 22, 2024
2 parents 2f9fb12 + fe215b1 commit 41a546e
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: bmm
Title: Easy and Accesible Bayesian Measurement Models using 'brms'
Version: 0.4.5.9000
Version: 0.4.6.9000
Authors@R: c(
person("Vencislav", "Popov", , "[email protected]", role = c("aut", "cre", "cph")),
person("Gidon", "Frischkorn", , "[email protected]", role = c("aut", "cph")),
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* you can now choose to estimate parameters that are fixed to a constant by default for all models (#145)
* default priors for all models are now specified via the configure_prior() S3 method (#145)
* `cmdstanr` will be used as the default backend for `brms` if the user has it installed (#145)
* various updates to the documentation and data sets

### Bug fixes
* fix a bug preventing the sort_data check from being executed (#72)
Expand Down
3 changes: 3 additions & 0 deletions R/bmm_model_IMM.R
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ check_data.IMMspatial <- function(model, data, formula) {
"The number of columns for non-target distances in the argument \\
'nt_distances' should equal max(setsize)-1})")

# replace nt_distances
data[,nt_distances][is.na(data[,nt_distances])] <- 999

stopif(any(data[,nt_distances] < 0),
"All non-target distances to the target need to be postive.")

Expand Down
Binary file modified data/OberauerLin_2017.rda
Binary file not shown.
3 changes: 2 additions & 1 deletion man/configure_model.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/testthat/test-bmm_model_IMM.R
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,13 @@ test_that('IMM models run when setsize is a predictor and intercept is supressed
formula <- bmf(
kappa ~ 1,
c ~ 1,
s ~ 0+set_size
s ~ 0 + set_size
)
model <- IMMbsc(resp_err = 'dev_rad',
nt_features = paste0("col_nt",1:7),
nt_distances = paste0("dist_nt",1:7),
setsize = "set_size")
expect_silent(fit_model(formula, dat, model, backend = 'mock', mock=1, rename = F))
expect_silent(fit_model(formula, dat, model, backend = 'mock', mock = 1, rename = F))


formula <- bmf(
Expand Down

0 comments on commit 41a546e

Please sign in to comment.