MAS 640 Homework 2 Due April 19th by 6:00pm 1. Simulation. Suppose I am trying to simulate some time series data. I first simulated white noise errors with n = 4. The realized values are e0 = 0.2, e1...

1 answer below »
R Code


MAS 640 Homework 2 Due April 19th by 6:00pm 1. Simulation. Suppose I am trying to simulate some time series data. I first simulated white noise errors with n = 4. The realized values are e0 = 0.2, e1 = 1, e2 = −0.7, and e3 = 0.6. (a) For an MA(1) with θ1 = 0.8, calculate y1, y2, y3. (b) For an AR(1) with φ1 = −0.6, calculate y1, y2, y3 (suppose y0 = e0). (c) For an ARMA(1,1) with φ1 = −0.6 and θ1 = 0.8, calculate y1, y2, y3 (suppose y0 = e0). 2. Forecasting. Suppose that annual sales (in millions of dollars) of the Acme Corporation follow an AR(2) model with Yt = 5 + 1.1Yt−1 − 0.5Yt−2 + et. If sales for 2017, 2018, and 2019 were 9 million, 11 million, and 10 million, respectively. Calculate the forecasted sales for 2020 and 2021. 3. Working with data. I have put three data sets on the course website: • ibm: daily closing IBM stock prices, • internet: number of users logged on to an Internet server each minute (dates/times not given), • gasprices: average price (US dollars per gallon) for regular gasoline in the United States; there are n = 145 weekly observations collected from 1/5/2009 to 10/10/2011. Pick any two out of the three (you do not need to analyze all three), and perform time series anal- ysis and forecasting as follows. • Identify a small set of candidate ARIMA(p,d,q) models for each data set. There may be a single model that emerges as a clear favorite, or there may not. For guidance, use the summary described in Lecture 5. For each data set, write up detailed notes that describe how you decided on the model(s) you did. Your summary should convince me that your model(s) is (are) worthy of further consideration. • Fit your selected model(s) and perform model diagnostics. That is, fit your chosen model(s). Then, diagnose your fitted model(s) by doing a thorough analysis of the residuals and im- plementing the overfitting technique. Your goal is to come up with one final model for each chosen dataset - the “best” one. There are no “right” answers here, but there are certainly bad answers (stay away from those). • With your final choices for the two chosen datasets, calculate MMSE forecasts and prediction intervals for future values. I will let you decide “how far out” in time to forecast. For each data set, display the forecasts and prediction bands visually like I do in the notes. 1 1.672 1.772 1.832 1.813 1.871 1.897 1.931 1.868 1.91 1.918 1.885 1.944 2.03 2.011 2.025 2.031 2.016 2.045 2.218 2.281 2.414 2.502 2.6 2.639 2.65 2.593 2.563 2.479 2.411 2.46 2.511 2.596 2.58 2.572 2.553 2.519 2.499 2.477 2.425 2.396 2.432 2.532 2.641 2.66 2.627 2.585 2.603 2.594 2.601 2.56 2.546 2.564 2.627 2.717 2.703 2.666 2.618 2.611 2.563 2.621 2.671 2.721 2.76 2.792 2.765 2.795 2.829 2.831 2.815 2.864 2.87 2.823 2.741 2.679 2.674 2.652 2.696 2.712 2.676 2.666 2.672 2.703 2.687 2.74 2.696 2.653 2.64 2.647 2.695 2.703 2.668 2.705 2.793 2.795 2.772 2.76 2.832 2.849 2.828 2.805 2.917 2.937 2.934 3.015 3.034 3.052 3.068 3.074 3.061 3.094 3.095 3.141 3.341 3.473 3.517 3.507 3.538 3.635 3.743 3.787 3.817 3.906 3.907 3.905 3.788 3.741 3.738 3.664 3.597 3.513 3.534 3.608 3.648 3.667 3.684 3.646 3.576 3.552 3.601 3.643 3.629 3.56 3.461 3.381 3.368 460 457 452 459 462 459 463 479 493 490 492 498 499 497 496 490 489 478 487 491 487 482 479 478 479 477 479 475 479 476 476 478 479 477 476 475 475 473 474 474 474 465 466 467 471 471 467 473 481 488 490 489 489 485 491 492 494 499 498 500 497 494 495 500 504 513 511 514 510 509 515 519 523 519 523 531 547 551 547 541 545 549 545 549 547 543 540 539 532 517 527 540 542 538 541 541 547 553 559 557 557 560 571 571 569 575 580 584 585 590 599 603 599 596 585 587 585 581 583 592 592 596 596 595 598 598 595 595 592 588 582 576 578 589 585 580 579 584 581 581 577 577 578 580 586 583 581 576 571 575 575 573 577 582 584 579 572 577 571 560 549 556 557 563 564 567 561 559 553 553 553 547 550 544 541 532 525 542 555 558 551 551 552 553 557 557 548 547 545 545 539 539 535 537 535 536 537 543 548 546 547 548 549 553 553 552 551 550 553 554 551 551 545 547 547 537 539 538 533 525 513 510 521 521 521 523 516 511 518 517 520 519 519 519 518 513 499 485 454 462 473 482 486 475 459 451 453 446 455 452 457 449 450 435 415 398 399 361 383 393 385 360 364 365 370 374 359 335 323 306 333 330 336 328 316 320 332 320 333 344 339 350 351 350 345 350 359 375 379 376 382 370 365 367 372 373 363 371 369 376 387 387 376 385 385 380 373 382 377 376 379 386 387 386 389 394 393 409 411 409 408 393 391 388 396 387 383 388 382 384 382 383 383 388 395 392 386 383 377 364 369 355 350 353 340 350 349 358 360 360 366 359 356 355 367 357 361 355 348 343 330 340 339 331 345 352 346 352 357 88 84 85 85 84 85 83 85 88 89 91 99 104 112 126 138 146 151 150 148 147 149 143 132 131 139 147 150 148 145 140 134 131 131 129 126 126 132 137 140 142 150 159 167 170 171 172 172 174 175 172 172 174 174 169 165 156 142 131 121 112 104 102 99 99 95 88 84 84 87 89 88 85 86 89 91 91 94 101 110 121 135 145 149 156 165 171 175 177 182 193 204 208 210 215 222 228 226 222 220 MAS 640 Homework 2 Due April 19th by 6:00pm 1. Simulation. Suppose I am trying to simulate some time series data. I first simulated white noise errors with n = 4. The realized values are e0 = 0.2, e1 = 1, e2 = −0.7, and e3 = 0.6. (a) For an MA(1) with θ1 = 0.8, calculate y1, y2, y3. (b) For an AR(1) with φ1 = −0.6, calculate y1, y2, y3 (suppose y0 = e0). (c) For an ARMA(1,1) with φ1 = −0.6 and θ1 = 0.8, calculate y1, y2, y3 (suppose y0 = e0). 2. Forecasting. Suppose that annual sales (in millions of dollars) of the Acme Corporation follow an AR(2) model with Yt = 5 + 1.1Yt−1 − 0.5Yt−2 + et. If sales for 2017, 2018, and 2019 were 9 million, 11 million, and 10 million, respectively. Calculate the forecasted sales for 2020 and 2021. 3. Working with data. I have put three data sets on the course website: • ibm: daily closing IBM stock prices, • internet: number of users logged on to an Internet server each minute (dates/times not given), • gasprices: average price (US dollars per gallon) for regular gasoline in the United States; there are n = 145 weekly observations collected from 1/5/2009 to 10/10/2011. Pick any two out of the three (you do not need to analyze all three), and perform time series anal- ysis and forecasting as follows. • Identify a small set of candidate ARIMA(p,d,q) models for each data set. There may be a single model that emerges as a clear favorite, or there may not. For guidance, use the summary described in Lecture 5. For each data set, write up detailed notes that describe how you decided on the model(s) you did. Your summary should convince me that your model(s) is (are) worthy of further consideration. • Fit your selected model(s) and perform model diagnostics. That is, fit your chosen model(s). Then, diagnose your fitted model(s) by doing a thorough analysis of the residuals and im- plementing the overfitting technique. Your goal is to come up with one final model for each chosen dataset - the “best” one. There are no “right” answers here, but there are certainly bad answers (stay away from those). • With your final choices for the two chosen datasets, calculate MMSE forecasts and prediction intervals for future values. I will let you decide “how far out” in time to forecast. For each data set, display the forecasts and prediction bands visually like I do in the notes. 1
Answered Same DayApr 17, 2021

Answer To: MAS 640 Homework 2 Due April 19th by 6:00pm 1. Simulation. Suppose I am trying to simulate some time...

Anu answered on Apr 18 2021
142 Votes
ANS 1) Simulate White Noise Process with the help of R command
Wn<-arima.sim(model=list(order=c(0,0,0)),n=4)
·
Simulate Y for MA(1) process with the help of R command
Y<-arima.sim(model=list(order=c(0,0,1), ma=0.8),n=4)
Find out the mean of Y =c= 0.426
MA(1)
Y1=c+e1+θ1e0 = 0.426+1+(0.8*0.2) = 1.586
Y2=c+e2+θ1e1 = 0.426-0.7+(0.8*1) = 0.526
Y3=c+e3+θ1e2 = 0.426+0.6+(0.8*(-0.7)) = 0.466
· Simulate Y for AR(1) process with the help of R command
Y<-arima.sim(model=list(order=c(1,0,0), ar=-0.6),n=4)
Find out the mean of Y =c= 0.192
AR(1)
Y1=c+e1+?1Y0 = 0.192+0.2+(-0.6*0.2) = .272
Y2=c+e2+ ? 1Y1 = 0.192+1+(-0.6*0.272) = -0.44
Y3=c+e3+ ? 1Y2 = 0.192-0.7+(-0.6*(-0.44)) = -0.244
· Simulate Y for ARMA(1,1) process with the help of R command
Y<-arima.sim(model=list(order=c(1,0,1), ar=-0.6, ma=0.8),n=4)
Find out the mean of Y =c= -0.271
ARMA(1,1)
Y1=c+e1+?1Y0 + θ1e0 = 0.192+0.2+(-0.6*0.2)+ (0.8*0.2) = 0.432
Y2=c+e2+ ? 1Y1+ θ1e1 = 0.192+1+(-0.6*0.272)+ (0.8*1) = 1.24
Y3=c+e3+ ? 1Y2 + θ1e2 = 0.192-0.7+(-0.6*(-0.44)) +(0.8*(-0.7)) = -0.316
ANS2)
· 2020 = 5 + 1.1*Y2019 - 0.5*Y2018 =5+(1.1*10)-(0.5*11) = 10.5...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here