- Linear Regression
- Bank Salaries Example
- Likelihood
- Reference and Conjugate Priors
male
.Bankdata <- read.table(file="http://www.ics.uci.edu/~wjohnson/BIDA/Ch9/BankSalaryData.txt", header=T, sep="") attach(Bankdata) options(contrasts=c("contr.treatment","contr.poly")) head(Bankdata)
## Sex BegSal Educ Exper Time ## 1 1 3900 12 0.0 1 ## 2 2 4620 12 11.5 22 ## 3 1 4020 10 44.0 7 ## 4 2 5040 15 14.0 3 ## 5 1 4290 12 5.0 30 ## 6 2 5100 12 180.0 15
Need to specify a prior for \(\theta' = ( \beta' , \tau)\).
Parameters | Mean | Scale | 2.5% | 97.5% |
---|---|---|---|---|
Constant | 3526.4 | 327.2 | 2875.2 | 4177.6 |
Sex | 722.3 | 117.8 | 488.2 | 956.4 |
Educ | 90.02 | 24.69 | 40.95 | 139.09 |
Exp | 1.27 | 0.59 | 0.10 | 2.43 |
Time | 23.43 | 5.20 | 13.09 | 33.76 |
\(x_f′ \beta\) | 6531.2 | 145.7 | 6241.6 | 6820.8 |
\(y_f\) | 6531.2 | 527.9 | 5482.0 | 7580.4 |
\(\tau\) | 3.88e-6 | 0.585e-6 | 2.82e-6 | 5.11e-6 |
Parameters | Mean | Scale | 2.5% | 97.5% |
---|---|---|---|---|
Constant | 3470.4 | 320.1 | 2834.7 | 4106.0 |
Sex | 708.5 | 114.4 | 481.4 | 935.7 |
Educ | 93.35 | 24.08 | 45.54 | 141.17 |
Exp | 1.35 | 0.57 | 0.21 | 2.49 |
Time | 23.84 | 5.00 | 13.90 | 33.77 |
\(x_f′ \beta\) | 6532.7 | 142.9 | 6248.9 | 6816.5 |
\(y_f\) | 6532.7 | 519.3 | 5501.4 | 7564.0 |
\(\tau\) | 4.01e-6 | 0.588e-6 | 2.94e-6 | 5.24e-6 |