############################################################################################### # # Bayesian simple linear regression with mixture of normal errors # ############################################################################################### # # Author: Hedibert Freitas Lopes # Affiliation: Graduate School of Business, University of Chicago # # This version: May, 13th 2005 # ############################################################################################### # # A few steps before you "source" this file into R: # # [1] In R change the directory to the one you currently have the executable file # # "mixtureofnormal-regression.exe" # # # [2] Change the simulation specification accordinlgy. # # # [3] Once [1] and [2] are done, simply type # # > source("Bayesianregressionwithmixtureerrors.R") # # # [4] Several files will be created plus graphical summaries in a PDF file called # # "Bayesianregressionwithmixtureerrors.pdf" # ############################################################################################### quantab = function(x){return(x[(x>quantile(x,0.05))&(x