README text file for the unix shar file BMA.shar. 1. All programs in BMA.shar have been developed by Jennifer Hoeting (jah@lamar.ColoState.EDU), with the assistance of Gary Gadbury (gadbury@statsun.stat.ColoState.EDU). This software is not formally maintained, but we will be happy to hear from people who have problems with it. Permission is hereby granted to StatLib to redistribute this software. The software can be freely used for non-commercial purposes, and can be freely distributed for non-commercial purposes only. The copyright is retained by the developer. Copyright 1995 Jennifer A. Hoeting 2. References: Hoeting, J.A., Adrian Raftery, David Madigan (1995) "A Method for Simultaneous Variable Selection and Outlier Identification", Technical Report 9502, Department of Statistics, Colorado State University. Hoeting, J. (1994), "Accounting for Model Uncertainty in linear regression", Ph.D. dissertation, University of Washington. These papers are available via the World Wide Web using the url: http://www.colostate.edu/Depts/STAT/Documents/hoeting.papers.html 3. BMA(Bayesian Model Averaging).shar is a collection of S-plus programs that perform Bayesian simultaneous variable selection and outlier identification (SVO) via Markov chain Monte Carlo model composition (MC^3). There are five modules contained in BMA.shar in addition to the README file. They are: MC3.REG - this is the parent program that receives input, structures the data for calculations, and formats the output. See examples below. For.MC3.REG - an S-plus For loop called by MC3.REG that computes posterior probabilities and performs MCMC for variable selection and outlier identification. MC3.REG.choose - called by the For loop to randomly select a new predictor model or a new outlier model. MC3.REG.logpost - called by both the parent program and the For loop to compute the log of the posterior model probability. out.lmsreg - a stand alone program to select potential outliers from a data set. The output of out.lmsreg can be used as input to the outs.list parameter of MC3.REG. 4. The following examples show input commands for both out.lmsreg and MC3.REG for selected data sets, and the resulting output (truncated). Example 1: Scottish hill racing data (see Hoeting 1994). Sample input - >b<-out.lmsreg(races[,-1],races[,1],2) >RACES.run1<-MC3.REG(y.races,x.races,num.its=20000,c(F,T),rep(T,length(b)), b,.1,7,.2,.1684,9.2) >RACES.run1[1:20,] X1 X2 6 7 10 11 14 15 17 18 19 26 33 35 Post.Mod.Pr. #visits 40 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0.563009192 11234 34 1 1 0 1 0 0 0 0 0 1 1 0 1 0 0.108741574 2303 41 1 1 0 1 0 0 1 0 0 1 0 0 1 0 0.055648357 1302 57 1 1 1 1 0 0 0 0 0 1 0 0 1 0 0.051300315 947 68 1 1 0 1 0 0 0 0 0 1 0 0 0 0 0.042710082 697 47 1 1 0 1 0 1 0 0 0 1 0 0 1 0 0.018255390 372 42 1 1 0 1 0 0 0 0 0 1 0 1 1 0 0.017550885 246 70 1 1 0 1 0 0 0 1 0 1 0 0 1 0 0.014377033 388 66 1 1 0 1 1 0 0 0 0 1 0 0 1 0 0.012362058 204 33 1 1 1 1 0 0 0 0 0 1 1 0 1 0 0.011938033 174 67 1 1 0 1 0 0 0 0 0 1 0 0 1 1 0.011764571 224 36 1 1 0 1 0 0 1 0 0 1 1 0 1 0 0.011598439 243 69 1 1 0 1 0 0 0 0 1 1 0 0 1 0 0.009540701 232 106 1 1 1 1 0 0 1 0 0 1 0 0 1 0 0.005918905 125 25 1 1 0 1 0 0 0 0 0 1 1 1 1 0 0.004149772 69 39 1 1 0 1 0 1 0 0 0 1 1 0 1 0 0.003716219 76 109 1 1 0 1 0 0 0 1 0 1 1 0 1 0 0.003273965 52 37 1 1 0 1 0 0 0 0 0 1 1 0 0 0 0.003219818 64 77 1 1 0 1 0 0 1 0 0 1 0 0 0 0 0.003137438 56 35 1 1 0 1 0 0 0 0 0 1 1 0 1 1 0.002376023 55 --------------------------------------------------------------------------- Example 2: Crime data (see Hoeting 1994). In this example we did not consider outliers, so the outlier model and the parameter outs.list are set to NULL. Since outliers are not considered, hyperparameters PI and K are also set to zero. Note: The program accepts a starting model for outliers set equal to NULL only if outs.list (the set of potential outliers) is also NULL. Sample input/output: >crime.run1<-MC3.REG(y.crime.log,x.crime.log,30000,rep(T,15),NULL,NULL,0,0, nu= 2.58, lambda = 0.28,phi = 2.85) >crime.run1[1:20,] X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 Post.Mod.Pr. #visits 167 1 0 1 1 0 0 0 0 1 0 1 0 1 1 0 0.024538963 760 458 1 0 1 1 0 0 0 0 0 0 1 0 1 1 0 0.017479142 495 144 1 0 1 1 0 0 0 0 1 0 0 0 1 1 0 0.016261682 462 340 1 0 1 0 1 0 0 0 1 0 1 0 1 1 0 0.015532250 586 168 1 0 1 1 0 0 0 0 1 0 1 0 1 1 1 0.015034825 432 142 1 0 1 1 0 0 0 0 1 0 0 0 1 1 1 0.015019941 318 37 0 0 1 1 0 0 0 1 1 0 0 0 1 1 0 0.014777818 460 74 1 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0.012303096 408 846 1 0 1 1 0 0 0 0 0 0 1 0 1 0 0 0.011384699 293 295 1 0 1 0 1 0 0 0 0 0 1 0 1 1 0 0.011137065 304 283 1 0 1 1 1 0 0 0 1 0 1 0 1 1 0 0.010916401 302 457 1 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0.009489289 332 194 1 0 1 1 0 0 0 0 1 0 1 1 1 1 0 0.009409087 307 339 1 0 1 0 1 0 0 0 1 0 0 0 1 1 0 0.009305826 326 175 1 0 1 1 0 0 0 1 1 0 0 0 1 1 0 0.009001765 240 1062 1 0 1 1 1 0 0 0 0 0 1 0 1 1 0 0.008725018 273 396 0 0 1 0 1 0 0 1 1 0 0 0 1 1 0 0.008660988 219 136 1 0 1 1 0 0 0 0 1 0 0 1 1 1 1 0.008474762 171 116 1 0 1 0 1 0 0 0 1 0 1 1 1 1 0 0.008177776 307 237 0 0 1 1 0 0 0 0 1 0 0 0 1 1 0 0.007964352 302