path <- commandArgs()[6] ############################## load(paste(path, "football.RData", sep="")) result <- (football$favorite - football$underdog) - football$spread td <- sqrt(sum(result^2) / length(result)) f.pri <- function(s) s^{-2} f.pos <- function(s) { nu <- 672; sigma <- td exp( (nu / 2) * log(nu / 2) + nu * log(sigma) - (nu / 2 + 1) * log(s) - (nu * sigma^2 / (2 * s)) - lgamma(nu / 2) ) } ############################## postscript( file=paste(path, "grp2.7-2.eps", sep=""), width = 9, height = 9, pointsize = 24, horizontal = FALSE, onefile = FALSE, paper = "special", family="Palatino" ) par(mar=c(3.2, 0.5, 1.5, 0.5), mgp=c(2.0, 0.7, 0)) curve( f.pri, 160, 240, n = 1001, ylim = c(0, 4.0e-05), lty = 1, col = "#E64B6B", lwd = 6, yaxt = "n", xlab = expression(sigma^2), main = "prior density" ) dev.off() ############################## postscript( file=paste(path, "grp2.7-3.eps", sep=""), width = 9, height = 9, pointsize = 24, horizontal = FALSE, onefile = FALSE, paper = "special", family="Palatino" ) par(mar=c(3.2, 0.5, 1.5, 0.5), mgp=c(2.0, 0.7, 0)) curve( f.pos, 160, 240, n = 1001, lty = 1, col = "#E64B6B", lwd = 6, yaxt = "n", xlab = expression(sigma^2), main = "posterior density" ) dev.off()