Question
Use JAGS (or OpenBUGS) to carry out your analysis. Data for both problems are in the accompanying workbook, Data for Chapter 8 Homework.xlsx Problem 8-1.
Use JAGS (or OpenBUGS) to carry out your analysis. Data for both problems are in the accompanying workbook, Data for Chapter 8 Homework.xlsx Problem 8-1. Applying reasonable assumptions for your likelihood and priors, a. Estimate the mean and standard deviation of the data in the Prob 8-1 Data worksheet. b. Predict the next (i.e., 21st) value c. Perform, at a minimum, three diagnostic tests: gelman plot, chain mixing plots (e.g., an xyplot), and density plots Problem 8-2. Perform a Bayesian t-test on means of the two vectors in Prob 8-2 Data worksheet. a. Create a boxplot of the two vectors b. Develop and plot the distribution of the difference between the two vectors c. Whats the probability that one vector is different than the other? d. Whats your inference about the difference between the difference between the two vectors?
#### Data for prob. 8-1
y <- c(46,58,40,47,47,
53,43,48,50,55,
49,50,52,56,49,
54,51,50,52,50)
### Data for Prob. 8-2
#### Load the first variable, y1
# Paint rows 9 through 47; then run. Check to see if you loaded
# the data by running row 48
y1 <- scan()
38.8553906
37.72697879
33.9927533
28.28042042
44.85345117
42.37323534
27.88641307
47.06868786
46.14588539
43.38863826
40.98222931
39.91336814
37.83431795
36.20538628
32.26228853
56.32063644
31.00440411
38.3647674
46.93443409
43.00464714
36.60734971
31.07214685
43.89040099
32.88871042
40.13798746
57.28880461
50.28243855
44.97124922
51.25137263
37.1055347
47.99782492
42.79146886
48.62850745
39.27568216
36.42870611
30.58131302
length(y1)
print(y1)
### Load the second variable, y2
# Paint rows 55 through 97; then run. Check to see if you loaded
# the data by running row 98
y2 <- scan()
47.13782469
37.73630642
30.47735768
44.52019865
24.58812192
36.82541191
44.28001745
24.78833396
34.06576448
30.57757167
31.94306958
36.13935844
35.98491236
40.14024383
39.36550232
34.6459198
40.53653143
30.89848625
55.12277878
48.84548083
33.44247004
53.67390563
19.19676362
58.42801752
38.71277052
38.58246061
27.74643761
36.5683806
29.87023862
39.22827839
45.54786713
32.72168699
46.81731985
45.27289966
44.73590622
48.15835077
23.10200093
54.32440014
38.43423327
48.02179611
length(y2)
print(y2)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started