powered by
Using Zellner's G priors, computes the log marginal density for all possible regression models
bayes.model.selection(y, X, c, constant=TRUE)
vector of response values
matrix of covariates
parameter of the G prior
logical variable indicating if a constant term is in the matrix X
data frame specifying the model, the value of the log marginal density and the value of the posterior model probability
logical vector indicating if the laplace algorithm converged for each model
# NOT RUN { data(birdextinct) logtime=log(birdextinct$time) X=cbind(1,birdextinct$nesting,birdextinct$size,birdextinct$status) bayes.model.selection(logtime,X,100) # }
Run the code above in your browser using DataLab