Skip to content

Commit

Permalink
fix: model_summary_table() \w prior_none() (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
FBartos authored Jun 23, 2023
1 parent cd35182 commit aeb918e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: BayesTools
Title: Tools for Bayesian Analyses
Version: 0.2.14
Version: 0.2.15
Description: Provides tools for conducting Bayesian analyses and Bayesian model averaging
(Kass and Raftery, 1995, <doi:10.1080/01621459.1995.10476572>,
Hoeting et al., 1999, <doi:10.1214/ss/1009212519>). The package contains
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## version 0.2.15
### Fixes
- fixing repeated print of previous prior distribution in `model_summary_table()` in case of `prior_none()`

## version 0.2.14
### Features
- adding `contrast = "meandif"` to the `prior_factor` function which generates identical prior distributions for difference between the grand mean and each factor level
Expand Down
4 changes: 3 additions & 1 deletion R/summary-tables.R
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,9 @@ model_summary_table <- function(model, model_description = NULL, title = NULL, f
summary_priors <- "Parameter prior distributions"
for(i in seq_along(prior_list)){
# get the prior name
if(remove_spike_0 && is.prior.point(prior_list[[i]]) && prior_list[[i]][["parameters"]][["location"]] == 0 || (names(prior_list)[[i]] %in% remove_parameters)){
if(is.prior.none(prior_list[[i]])){
next
}else if(remove_spike_0 && is.prior.point(prior_list[[i]]) && prior_list[[i]][["parameters"]][["location"]] == 0 || (names(prior_list)[[i]] %in% remove_parameters)){
next
}else if(is.prior.weightfunction(prior_list[[i]]) | is.prior.PET(prior_list[[i]]) | is.prior.PEESE(prior_list[[i]])){
temp_prior <- print(prior_list[[i]], silent = TRUE, short_name = short_name)
Expand Down

0 comments on commit aeb918e

Please sign in to comment.