# this loads the source code of BMS 0.3.3 (2013-11-22) # see http://bms.zeugner.eu for the R package and documentation # sPath is the path to the directory where the files reside # if there is no sPath, then files are loaded from web # note that you can check the source code files at http://bms.zeugner.eu/getBMS/source/ #load core files for library if (!exists("sPath")) {sPath="http://bms.zeugner.eu/getBMS/source/"} else {if((nchar(sPath)>1)&(substr(sPath,nchar(sPath),nchar(sPath))!="/")) sPath=paste(sPath,"/",sep="") } setClass("topmod",representation(addmodel="function", lik="function", bool="function", ncount="function", nbmodels="function", nregs="function", betas_raw="function", betas2_raw="function", kvec_raw="function", bool_binary="function", betas="function", betas2="function", fixed_vector="function")) setClass("bma",representation(info="list",arguments="list",topmod="topmod",start.pos="integer",gprior.info="list",mprior.info="list",X.data="data.frame",reg.names="character",bms.call="call")) setClass("zlm",representation(coefficients="numeric",residuals="numeric",rank="numeric",fitted.values="numeric",df.residual="numeric",call="call",terms="formula",model="data.frame",coef2moments="numeric",marg.lik="numeric",gprior.info="list")) source(paste(sPath,"aux_outer.R",sep="")) source(paste(sPath, "aux_inner.R",sep="")) source(paste(sPath,"bma.R",sep="")) #load Fernandez, Ley and Steel data dataFrame=read.table(paste(sPath,"fls_data.txt",sep=""),header=T) remofls=c("Country","pop50","Latitude","Longitude","Port", "OECD") datafls=dataFrame[,-charmatch(remofls,colnames(dataFrame))]; ctryiso=c("DZ", "AR", "AU", "AT", "BE", "BO", "BW", "BR", "CM", "CA", "CL", "CO", "CG", "CR", "CY", "DK", "DO", "EC", "SV", "ET", "FI", "FR", "DE", "GH", "GR", "GT", "HT", "HN", "HK", "IN", "IE", "IL", "IT", "JM", "JP", "JO", "KE", "KR", "MG", "MW", "MY", "MX", "MA", "NL", "NI", "NG", "NO", "PK", "PA", "PY", "PE", "PH", "PT", "SN", "SG", "ES", "LK", "SE", "CH", "TW", "TZ", "TH", "TN", "TR", "UG", "UK", "US", "UY", "VE", "ZR", "ZM", "ZW") rownames(datafls)=ctryiso rm(remofls); rm(dataFrame); rm(ctryiso)