#Analysis of Ozone35 data
data(Ozone35)
#We use here the (Zellner) g-prior for
#regression parameters and constant prior
#over the model space
#In this Gibbs sampling scheme, we perform 10100 iterations,
#of which the first 100 are discharged (burnin)
#as initial model we use the null model (only intercept)
Oz35.GibbsBvs<- GibbsBvs(formula="y~.", data=Ozone35, prior.betas="gZellner",
prior.models="Constant", n.iter=10000, init.model="null", n.burnin=100, time.test = FALSE)
#Note: this is a heuristic approach and results are estimates
#of the exact answer.
#with the print we can see which is the most probable model
#among the visited
Oz35.GibbsBvs
#The estimation of inclusion probabilities and
#the model-averaged estimation of parameters:
summary(Oz35.GibbsBvs)
#Plots:
plotBvs(Oz35.GibbsBvs, option="conditional")
Run the code above in your browser using DataLab