Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add DV as variable to model() call & add bmm_formula #92

Merged
merged 50 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
caadeb1
add DV as variable to model() call & add bmm_formula
GidonFrischkorn Feb 12, 2024
1d976a9
Resovle conflicts
GidonFrischkorn Feb 12, 2024
ab76a47
change "bias" to "mu"
GidonFrischkorn Feb 12, 2024
6aa24f9
Adapt unit test to bmm_formula set-up.
GidonFrischkorn Feb 13, 2024
412aa84
Merge branch 'develop' into 79-DV-passed-to-model
venpopov Feb 13, 2024
58b635d
Add more detailed description of the bmm formulas
venpopov Feb 13, 2024
f33ff77
rename bmm_formula to bmmformula and replace all old brmsformula refe…
venpopov Feb 13, 2024
b191f0e
add bmf() alias, move bmmformula to own file
venpopov Feb 13, 2024
5739124
update valid formula check, add class 'bmmformula'
venpopov Feb 13, 2024
b6a240a
fix bmf copy paste error
venpopov Feb 13, 2024
b7034e9
use base all.vars for extracting par names
venpopov Feb 13, 2024
d96b96f
delete not longer necessary get_response function
venpopov Feb 13, 2024
11e813e
simplify and move param check to own function
venpopov Feb 13, 2024
bb5aa36
change respErr to resp_err to be consistent in style with naming of o…
venpopov Feb 13, 2024
8d153f5
fix typos and some examples
venpopov Feb 14, 2024
5054896
update documentation
venpopov Feb 14, 2024
ff7793c
add + method for bmmformula
venpopov Feb 14, 2024
27cf549
add global optiom 'bmm.silent' to be able to supress messages'
venpopov Feb 14, 2024
3ed8b0d
minor fix to configure_options
venpopov Feb 14, 2024
fdef4fa
remove b parameter from IMM description
venpopov Feb 14, 2024
3f08fc5
make wrong_parameters recognize non-linear transformations
venpopov Feb 14, 2024
ae84729
check for "resp_err" in data should be in the vwm class
venpopov Feb 14, 2024
ffc60b2
add placeholder for notyetimplemented update method
venpopov Feb 14, 2024
7a88eb1
add void_mu argument to model_objects
venpopov Feb 14, 2024
14a9892
generalize formula conversion with bmf2bf method
venpopov Feb 14, 2024
7127c4f
generalize setting constant priors via function
venpopov Feb 14, 2024
0b6824f
fix missing brms:: before set_prior
venpopov Feb 15, 2024
c77a375
mixture3p ready with new formula syntax
venpopov Feb 15, 2024
6870f5d
mixture2p model ready with new syntax
venpopov Feb 15, 2024
9b684aa
imm ready with new formul syntax
venpopov Feb 15, 2024
553b65d
complete transition to bmmformula syntax
venpopov Feb 15, 2024
4733b8d
update formula and distribution tests, minor cleanup
venpopov Feb 15, 2024
6f0ddff
Update Vignettes to `bmmformula`
GidonFrischkorn Feb 15, 2024
4b2bc66
Remove test for spatial distances in `check_data.IMMspatial`
GidonFrischkorn Feb 15, 2024
49c9437
Add tests for `check_data.IMMspatial`
GidonFrischkorn Feb 15, 2024
f12c55a
Merge branch 'develop' into 79-DV-passed-to-model
venpopov Feb 15, 2024
80e6916
avoid overwrite of `bmf` when using `bmf2bf.bmmmodel`
GidonFrischkorn Feb 15, 2024
7bead4b
Update NEWS.md
GidonFrischkorn Feb 15, 2024
e9c12dd
Relabel `non_targets` and `spaPos` to `nt_features` and `nt_distance`
GidonFrischkorn Feb 15, 2024
1329df7
Update `use_model_template` and documentation
GidonFrischkorn Feb 16, 2024
b490d80
Spelling updates.
GidonFrischkorn Feb 16, 2024
d718d12
shorten var checks
venpopov Feb 16, 2024
b9ae6ba
Merge branch '79-DV-passed-to-model' of https://github.com/venpopov/b…
venpopov Feb 16, 2024
d27d8a3
rename nt_distance to nt_distances for consistency
venpopov Feb 16, 2024
3884a2d
minor stylistic changes, add class bmmfit,
venpopov Feb 16, 2024
72c7f79
revert renaming of arguments in ref fits
venpopov Feb 16, 2024
7b74826
change how stan files are read
venpopov Feb 16, 2024
80c50b2
add keywords to bmf2bf for website
venpopov Feb 16, 2024
e292e73
add fixed parameters to documentation of each model
venpopov Feb 16, 2024
52e8a8b
bump version number
venpopov Feb 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@
^Meta$
^dev_utils$
^index.md$
^tests/internal-.*$
^tests/internal$
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ docs
inst/doc
/doc/
/Meta/
/tests/internal/cmdstanr_output/
/tests/internal/*cache*
5 changes: 3 additions & 2 deletions 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.2.2.9000
Version: 0.3.0
Authors@R: c(
person("Vencislav", "Popov", , "[email protected]", role = c("aut", "cre", "cph")),
person("Gidon", "Frischkorn", , "[email protected]", role = c("aut", "cph")))
Expand All @@ -25,7 +25,8 @@ Suggests:
mixtur,
ggthemes,
cowplot,
stringr
stringr,
remotes
Config/testthat/edition: 3
Imports:
brms,
Expand Down
13 changes: 13 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Generated by roxygen2: do not edit by hand

S3method("+",bmmformula)
S3method("[",bmmformula)
S3method(bmf2bf,bmmmodel)
S3method(check_data,IMMspatial)
S3method(check_data,bmmmodel)
S3method(check_data,default)
S3method(check_data,nontargets)
S3method(check_data,vwm)
Expand All @@ -10,15 +14,23 @@ S3method(configure_model,IMMfull)
S3method(configure_model,mixture2p)
S3method(configure_model,mixture3p)
S3method(configure_model,sdmSimple)
S3method(fit_info,brmsfit)
S3method(fit_info,brmsfit_list)
S3method(model_info,bmmmodel)
S3method(postprocess_brm,bmmmodel)
S3method(postprocess_brm,default)
S3method(postprocess_brm,sdmSimple)
S3method(postprocess_brm,vwm)
S3method(rhs_vars,bmmformula)
S3method(rhs_vars,formula)
S3method(update,bmmfit)
export("%>%")
export(IMMabc)
export(IMMbsc)
export(IMMfull)
export(bmf)
export(bmf2bf)
export(bmmformula)
export(c_bessel2sqrtexp)
export(c_sqrtexp2bessel)
export(calc_error_relative_to_nontargets)
Expand All @@ -29,6 +41,7 @@ export(deg2rad)
export(dmixture2p)
export(dmixture3p)
export(dsdm)
export(fit_info)
export(fit_model)
export(get_model_prior)
export(get_stancode)
Expand Down
23 changes: 23 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
# bmm 0.3.0

### New features

* BREAKING CHANGE: The `fit_model` function now requires a `bmmformula` to be passed. The syntax of the `bmmformula` or its short form `bmf` is equal to specifying a `brmsformula`. However, as of this version the `bmmformula` only specifies how parameters of a `bmmmodel` change across experimental conditions or continuous predictors. The response variables that the model is fit to now have to be specified when the model is defined using `model = bmmmodel()`. (#79)
* BREAKING CHANGE: The `non_target` and `spaPos` variables for the `mixture3p` and `IMM` models were relabled to `nt_features` and `nt_distances` for consistency. This is also to communicate that distance is not limited to spatial distance but distances on any feature dimensions of the retrieval cues. Currently, still only a single generalization gradient for the cue features is possible.
* This release includes reference fits for all implemented models to ensure that future changes to the package do not compromise the included models and change the results that their implementations produce.
* The `check_formula` methods have been adapted to match the new `bmmformula` syntax. It now evaluates if formulas have been specified using the `bmmformula` function, if formulas for all parameters of a `bmmmodel` have been specified and warns the user that only a fixed intercept will be estimated if no formula for one of the parameters was provided. Additionally, `check_formula` throws an error should formulas be provided that do not match a parameter of the called `bmmmodel` unless they are part of a non-linear transformation.
* You can now specify formulas for internally fixed parameters such as `mu` in all visual working memory models. This allows you to predict if there is response bias in the data. If a formula is not provided for `mu`, the model will assume that the mean of the response distribution is fixed to zero.
* there is now an option `bmm.silent` that allows to suppress messages
* the baseline activation `b` was removed from the `IMM` models, as this is internally fixed
to zero for scaling and as of now cannot be predicted by independent variables because the model would be unidentifiable.
* the arguments used to fit the bmm model are now accessible in the `bmmfit` object via the `fit$bmm_fit_args` list.
* add class('bmmfit') to the object returned from fit_model() allowing for more flexible postprocessing of the underlying `brmsfit` object. The object is now of class('bmmfit', 'brmsfit')

### Bug Fixes
* an error with the treatment of distances in the `IMMfull` and the `IMMbsc` has been corrected. This versions ensures that only positive distances can be passed to any of the two models.
* removed a warning regarding the scaling of the distances in the `IMMfull` and the `IMMbsc` that was specific only for circular distances.

### Documentation
* All vignettes have been update to the new `bmmformula` syntax.


# bmm 0.2.2

### Bug Fixes
Expand Down
Loading