bbPrior {mombf} | R Documentation |
unifPrior
implements a uniform prior (equal a priori probability for all
models). binomPrior
implements a Binomial prior.
bbPrior
implements a Beta-Binomial prior.
unifPrior(sel, logscale=TRUE, groups=1:length(sel), constraints=lapply(1:length(unique(groups)), function(z) integer(0))) binomPrior(sel, prob=.5, logscale=TRUE, probconstr=prob, groups=1:length(sel), constraints=lapply(1:length(unique(groups)), function(z) integer(0))) bbPrior(sel, alpha=1, beta=1, logscale=TRUE, alphaconstr=alpha, betaconstr=beta, groups=1:length(sel), constraints=lapply(1:length(unique(groups)), function(z) integer(0)))
sel |
Logical vector indicating which variables are included in the model |
logscale |
Set to |
groups |
Group that each variable belongs to (e.g. dummy indicators for categorical variables with >2 categories). The idea is that all variables in a group are jointly added/removed from the model. By default all variables are assumed to be in separate groups |
constraints |
List with length equal to the number of groups
(distinct elements in |
prob |
Success probability for the Binomial prior |
probconstr |
Success probability for the Binomial prior for groups that are subject to constraints |
alpha |
First parameter of the Beta-Binomial prior, which is equivalent
to specifying a Beta(alpha,beta) prior on |
beta |
First parameter of the Beta-Binomial prior, which is equivalent
to specifying a Beta(alpha,beta) prior on |
alphaconstr |
Same as alpha for the groups that are subject to constraints |
betaconstr |
Same as beta for the groups that are subject to constraints |
Prior probability of the specified model
David Rossell
library(mombf) sel <- c(TRUE,TRUE,FALSE,FALSE) unifPrior(sel,logscale=FALSE) binomPrior(sel,prob=.5,logscale=FALSE) bbPrior(sel,alpha=1,beta=1,logscale=FALSE)