# Create a new spike and slab prior for Bayesian generalized linear models

Source:`R/prior_breg.R`

`BREGPrior.Rd`

Function to include prior information via Zellner-style spike
and slab prior for generalized linear models used in engine_breg. These
priors are similar to the horseshoe priors used in regularized engine_stan
models and penalize regressions by assuming most predictors having an effect
of `0`

.

## Usage

```
BREGPrior(variable, hyper = NULL, ip = NULL)
# S4 method for character
BREGPrior(variable, hyper = NULL, ip = NULL)
```

## Details

The Zellner-style spike and slab prior for generalized linear models
are specified as described in the Boom R-package. Currently supported
are two options which work for models with `Poisson`

and `binomial`

(`Bernoulli`

) distributed errors. Two types of priors can be provided on
a variable:

`"coefficient"`

Allows to specify Gaussian priors on the mean coefficients of the model. Priors on the coefficients can be provided via the`"hyper"`

parameter. Note that variables with such a prior can still be regularized out from the model.`"inclusion.probability"`

A`vector`

giving the prior probability of inclusion for the specified variable. This can be useful when prior information on preference is known but not the strength of it.

If coefficients are set, then the inclusion probability is also modified by
default. However even when not knowing a particular estimate of a beta
coefficients and their direction, one can still provide an estimate of the
inclusion probability. In other words:
**The hyperparameters 'hyper' and 'ip' can't be both NULL.**

## References

Hugh Chipman, Edward I. George, Robert E. McCulloch, M. Clyde, Dean P. Foster, Robert A. Stine (2001), "The Practical Implementation of Bayesian Model Selection" Lecture Notes-Monograph Series, Vol. 38, pp. 65-134. Institute of Mathematical Statistics.

## See also

Other prior:
`BARTPrior()`

,
`BARTPriors()`

,
`BREGPriors()`

,
`GDBPrior()`

,
`GDBPriors()`

,
`GLMNETPrior()`

,
`GLMNETPriors()`

,
`INLAPrior()`

,
`INLAPriors()`

,
`STANPrior()`

,
`STANPriors()`

,
`XGBPrior()`

,
`XGBPriors()`

,
`add_priors()`

,
`get_priors()`

,
`priors()`

,
`rm_priors()`