Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Oct 2, 2023
1 parent e535813 commit 33f6dbd
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 54 deletions.
49 changes: 22 additions & 27 deletions R/convert_bayesian_to_frequentist.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,33 @@
#' @param REML For mixed effects, should models be estimated using
#' restricted maximum likelihood (REML) (`TRUE`, default) or maximum
#' likelihood (`FALSE`)?
#' @examples
#' @examplesIf require("rstanarm")
#' \donttest{
#' # Rstanarm ----------------------
#' if (require("rstanarm")) {
#' # Simple regressions
#' model <- stan_glm(Sepal.Length ~ Species,
#' data = iris, chains = 2, refresh = 0
#' )
#' bayesian_as_frequentist(model)
#' }
#' }
#' # Simple regressions
#' model <- rstanarm::stan_glm(Sepal.Length ~ Species,
#' data = iris, chains = 2, refresh = 0
#' )
#' bayesian_as_frequentist(model)
#'
#' \donttest{
#' if (require("rstanarm")) {
#' model <- stan_glm(vs ~ mpg,
#' family = "binomial",
#' data = mtcars, chains = 2, refresh = 0
#' )
#' bayesian_as_frequentist(model)
#' model <- rstanarm::stan_glm(vs ~ mpg,
#' family = "binomial",
#' data = mtcars, chains = 2, refresh = 0
#' )
#' bayesian_as_frequentist(model)
#'
#' # Mixed models
#' model <- stan_glmer(Sepal.Length ~ Petal.Length + (1 | Species),
#' data = iris, chains = 2, refresh = 0
#' )
#' bayesian_as_frequentist(model)
#' # Mixed models
#' model <- rstanarm::stan_glmer(
#' Sepal.Length ~ Petal.Length + (1 | Species),
#' data = iris, chains = 2, refresh = 0
#' )
#' bayesian_as_frequentist(model)
#'
#' model <- stan_glmer(vs ~ mpg + (1 | cyl),
#' family = "binomial",
#' data = mtcars, chains = 2, refresh = 0
#' )
#' bayesian_as_frequentist(model)
#' }
#' model <- rstanarm::stan_glmer(vs ~ mpg + (1 | cyl),
#' family = "binomial",
#' data = mtcars, chains = 2, refresh = 0
#' )
#' bayesian_as_frequentist(model)
#' }
#'
#' @export
Expand Down
50 changes: 23 additions & 27 deletions man/convert_bayesian_as_frequentist.Rd

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

0 comments on commit 33f6dbd

Please sign in to comment.