Skip to content

Commit 58255f6

Browse files
committed
clean up doc of set_prior
1 parent 5b64db1 commit 58255f6

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

R/priors.R

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,22 @@
3838
#' \code{b_x1} and \code{b_x2} respectively.
3939
#' The default prior for fixed and category specific effects is an
4040
#' improper flat prior over the reals. Other common options are normal priors
41-
#' or uniform priors over a finite interval.
42-
#' If we want to have a normal prior with mean 0 and
41+
#' or student-t priors. If we want to have a normal prior with mean 0 and
4342
#' standard deviation 5 for \code{x1},
44-
#' and a uniform prior between -10 and 10 for \code{x2},
43+
#' and a unit student-t prior with 10 degrees of freedom for \code{x2},
4544
#' we can specify this via
4645
#' \code{set_prior("normal(0,5)", class = "b", coef = "x1")} and \cr
47-
#' \code{set_prior("uniform(-10,10)", class = "b", coef = "x2")}.
46+
#' \code{set_prior("student_t(10,0,1)", class = "b", coef = "x2")}.
4847
#' To put the same prior on all fixed effects at once,
4948
#' we may write as a shortcut \code{set_prior("<prior>", class = "b")}.
5049
#' This also leads to faster sampling, because priors can be vectorized in this case.
51-
#' Both ways of defining priors can be combined using for instance \cr
52-
#' \code{set_prior("normal(0,10)", class = "b", coef = "Intercept")} and \cr
53-
#' \code{set_prior("normal(0,2)", class = "b")} at the same time.
54-
#' This will set a \code{normal(0,10)} prior on the Intercept and a \code{normal(0,2)}
55-
#' prior on all other fixed effects. Note that the priors are no longer
56-
#' vectorized in this case.
50+
#' Both ways of defining priors can be combined using for instance
51+
#' \code{set_prior("normal(0,2)", class = "b")} and \cr
52+
#' \code{set_prior("normal(0,10)", class = "b", coef = "Intercept")}
53+
#' at the same time. This will set a \code{normal(0,10)} prior on
54+
#' the Intercept and a \code{normal(0,2)} prior on all other fixed effects.
55+
#' The intercept can have a separate prior without breaking vectorization.
56+
#' However, this is not the case for other fixed effects.
5757
#'
5858
#' A special shrinkage prior to be applied on fixed effects is the horseshoe prior.
5959
#' It is symmetric around zero with fat tails and an infinitely large spike
@@ -69,7 +69,7 @@
6969
#' so that slightly higher values may often be a better option.
7070
#' Generally, models with horseshoe priors a more likely than other models
7171
#' to have divergent transitions so that increasing \code{adapt_delta}
72-
#' from \code{0.95} to values closer to \code{1} will often be necessary.
72+
#' from \code{0.8} to values closer to \code{1} will often be necessary.
7373
#' See the documentation of \code{\link[brms:brm]{brm}} for instructions
7474
#' on how to increase \code{adapt_delta}. \cr
7575
#'

man/set_prior.Rd

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)