Infectious Disease > QUESTIONS & ANSWERS > Georgia tech ISYE 6501 OAN - Homework Week 4, Questions and answers, Graded A+, 2022/2023 (All)

Georgia tech ISYE 6501 OAN - Homework Week 4, Questions and answers, Graded A+, 2022/2023

Document Content and Description Below

ISYE 6501 OAN - Homework Week 4 Contents 1 Question 7.1 1 2 Question 7.2 2 2.1 Set up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.2 Load ... and examine the data for this assignment . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.3 Convert temps data to vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.4 Convert temps data to timeseries object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.5 Test Model 1: single exponential smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.6 Test Model 2: double exponential smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.7 Test Model 3: triple exponential smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.8 Test Model 4: triple exponential smoothing with multiplicative . . . . . . . . . . . . . . . . . 9 2.9 Compare additive vs multiplicative triple exponential smoothing models . . . . . . . . . . . . 11 2.10 Extract seasonality from the models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.11 QCC on seasonality to determine if summer is later . . . . . . . . . . . . . . . . . . . . . . . . 14 2.12 R Cusum - No adjustments for T or C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.13 R Cusum - T equal 10, C = 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3 Testing different values of T and C using R cusum 16 3.1 R Cusum decision.interval = .925, se.shift = .374 . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.2 R Cusum decision.interval = 1.5, se.shift = .25 . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.3 R Cusum decision.interval = 1.96, se.shift = .3 . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1 Question 7.1 1.0.1 Describe a situation or problem from your job, everyday life, current events, etc., for which exponential smoothing would be appropriate. What data would you need? Would you expect the value of ff (the first smoothing parameter) to be closer to 0 or 1, and why? When I worked for the commuter rail system in Illinois (known as Metra) the organization kept detailed records on something known as “on-time” performance. On-time performance is a measurement of how often commuter trains arrive on-time at their destination. With over a thousand daily commuter rail trips, each trip consisting of 1 or more stops, there is a lot of data. The state agency responsible for operating the commuter trains uses the data to estimate on-time performance and adjust schedules for trains on a daily basis. Forecasting using expotential smoothing would likely increase the accuracy of on-time performance and may reveal weekly or seasonal trends, or day-part trends, that are hidden in the data. Valuable data would include date, time and on-time performance - likely measured as a variance from the planned arrival at train stations. I believe the first smoothing factor would be closer to 0 because I would expect more randomness in the data due to the large number of random events that can occur - anything from equipment issues or failures to passenger or public issues - that can impact on-time performance. 12 Question 7.2 2.0.1 Using the 20 years of daily high temperature data for Atlanta (July through October) from Question 6.2 (file temps.txt), build and use an exponential smoothing model to help make a judgment of whether the unofficial end of summer has gotten later over the 20 years. (Part of the point of this assignment is for you to think about how you might use exponential smoothing to answer this question. Feel free to combine it with other models if you’d like to. There’s certainly more than one reasonable approach.) 2.0.2 Note: in R, you can use either HoltWinters (simpler to use) or the smooth package’s es function (harder to use, but more general). If you use es, the Holt-Winters model uses model=”AAM” in the function call (the first and second constants are used “A”dditively, and the third (seasonality) is used “M”ultiplicatively; the documentation doesn’t make that clear). 2.1 Set up # Clear the enviroment rm(list = ls()) # Set a working directory for this particular project setwd("~/OneDrive/GATechMS/ISYE6501/Week4") # Set a seed in case we work with any random number generators set.seed(52) # Load the libraries we need for this analysis library(qcc) ## Package 'qcc' version 2.7 ## Type 'citation("qcc")' for citing this R package in publications. 2.2 Load and examine the data for this assignment # Load the data from the file, name is uscrime.data temps.data <- read.table("temps.txt", header = TRUE, stringsAsFactors = FALSE) 2.3 Convert temps data to vector #Convert to vector data, vector.temps.data<-as.vector(unlist(temps.data[2:21])) 2.4 Convert temps data to timeseries object #convert to time series ts.vector.temps.data<-ts(vector.temps.data, start=1996, frequency = 123) 22.5 Test Model 1: single exponential smoothing # Data appears like triple expontneial smoothing # Test models #model1 - single expotential smoothing model1<-HoltWinters(ts.vector.temps.data, beta=FALSE, gamma=FALSE) model1 ## Holt-Winters exponential smoothing without trend and without seasonal component. ## ## Call: ## HoltWinters(x = ts.vector.temps.data, beta = FALSE, gamma = FALSE) ## ## Smoothing parameters: ## alpha: 0.8388021 ## beta : FALSE ## gamma: FALSE ## ## Coefficients: ## [,1] ## a 63.30952 plot(model1) Holt−Winters filtering Time Observed / Fitted 2000 2005 2010 2015 50 60 70 80 90 100 plot(model1$fitted) 350 70 90 xhat 50 70 90 2000 2005 2010 2015 level Time model1$fitted #alpha smoothing is .8388021 - close 0 more randomness, close 1 less randomness # test by changing alpha - .01 and view model line, more smoothing applied 2.6 Test Model 2: double exponential smoothing #model2 - double expoentiatl smoothing # st=ct model2<-HoltWinters(ts.vector.temps.data, gamma=FALSE) model2 ## Holt-Winters exponential smoothing with trend and without seasonal component. ## ## Call: ## HoltWinters(x = ts.vector.temps.data, gamma = FALSE) ## ## Smoothing parameters: ## alpha: 0.8445729 ## beta : 0.003720884 ## gamma: FALSE ## ## Coefficients: ## [,1] ## a 63.2530022 ## b -0.0729933 4plot(model2) Holt−Winters filtering Time Observed / Fitted 2000 2005 2010 2015 50 60 70 80 90 100 plot(model2$fitted) 50 70 90 xhat 50 70 90 level −1.0 −0.6 −0.2 2000 2005 2010 2015 trend Time model2$fitted 52.7 Test Model 3: triple exponential smoothing #model3 - triple exponential smoothing model3<-HoltWinters(ts.vector.temps.data) model3 ## Holt-Winters exponential smoothing with trend and additive seasonal component. ## ## Call: ## HoltWinters(x = ts.vector.temps.data) ## ## Smoothing parameters: ## alpha: 0.6610618 ## beta : 0 ## gamma: 0.6248076 ## ## Coefficients: ## [,1] ## a 71.477236414 ## b -0.004362918 ## s1 18.590169842 ## s2 17.803098732 ## s3 12.204442890 ## s4 13.233948865 ## s5 12.957258705 ## s6 11.525341233 ## s7 10.854441534 ## s8 10.199632666 ## s9 8.694767348 ## s10 5.983076192 ## s11 3.123493477 ## s12 4.698228193 ## s13 2.730023168 ## s14 2.995935818 ## s15 1.714600919 ## s16 2.486701224 ## s17 6.382595268 ## s18 5.081837636 ## s19 7.571432660 ## s20 6.165047647 ## s21 9.560458487 ## s22 9.700133847 ## s23 8.808383245 ## s24 8.505505527 ## s25 7.406809208 ## s26 6.839204571 ## s27 6.368261304 ## s28 6.382080380 ## s29 4.552058253 ## s30 6.877476437 ## s31 4.823330209 ## s32 4.931885957 ## s33 7.109879628 ## s34 6.178469084 6## s35 4.886891317 ## s36 3.890547248 ## s37 2.148316257 ## s38 2.524866001 ## s39 3.008098232 ## s40 3.041663870 ## s41 2.251741386 ## s42 0.101091985 ## s43 -0.123337548 ## s44 -1.445675315 ## s45 -1.802768181 ## s46 -2.192036338 ## s47 -0.180954242 ## s48 1.538987281 ## s49 5.075394760 ## s50 6.740978049 ## s51 7.737089782 ## s52 8.579515859 ## s53 8.408834158 ## s54 4.704976718 ## s55 1.827215229 ## s56 -1.275747384 ## s57 1.389899699 ## s58 1.376842871 ## s59 0.509553410 ## s60 1.886439429 ## s61 -0.806454923 ## s62 5.221873550 ## s63 5.383073482 ## s64 4.265584552 ## s65 3.841481452 ## s66 -0.231239928 ## s67 0.542761270 ## s68 0.780131779 ## s69 1.096690727 ## s70 0.690525998 ## s71 2.301303414 ## s72 2.965913580 ## s73 4.393732595 ## s74 2.744547070 ## s75 1.035278911 ## s76 1.170709479 ## s77 2.796838283 ## s78 2.000312540 ## s79 0.007337449 ## s80 -1.203916069 ## s81 0.352397232 ## s82 0.675108103 ## s83 -3.169643942 ## s84 -1.913321175 ## s85 -1.647780450 ## s86 -5.281261301 ## s87 -5.126493027 ## s88 -2.637666754 7## s89 -2.342133004 ## s90 -3.281910970 ## s91 -4.242033198 ## s92 -2.596010530 ## s93 -7.821281290 ## s94 -8.814741200 ## s95 -8.996689798 ## s96 -7.835655534 ## s97 -5.749139155 ## s98 -5.196182693 ## s99 -8.623793296 ## s100 -11.809355220 ## s101 -13.129428554 ## s102 -16.095143067 ## s103 -15.125436350 ## s104 -13.963606549 ## s105 -12.953304848 ## s106 -16.097179844 ## s107 -15.489223470 ## s108 -13.680122300 ## s109 -11.921434142 ## s110 -12.035411347 ## s111 -12.837047727 ## s112 -9.095808127 ## s113 -5.433029341 ## s114 -6.800835107 ## s115 -8.413639598 ## s116 -10.912409484 ## s117 -13.553826535 ## s118 -10.652543677 ## s119 -12.627298331 ## s120 -9.906981556 ## s121 -12.668519900 ## s122 -9.805502547 ## s123 -7.775306633 plot(model3) 8Holt−Winters filtering Time Observed / Fitted 2000 2005 2010 2015 50 60 70 80 90 100 2.8 Test Model 4: triple exponential smoothing with multiplicative #model4 triple with multiplicative model4<-HoltWinters(ts.vector.temps.data, seasonal = "multiplicative") plot(model4) [Show More]

Last updated: 1 year ago

Preview 1 out of 19 pages

Add to cart

Instant download

document-preview

Buy this document to get the full access instantly

Instant Download Access after purchase

Add to cart

Instant download

Also available in bundle (1)

GEORGIA TECH BUNDLE, ALL ISYE 6501 EXAMS, HOMEWORKS, QUESTIONS AND ANSWERS, NOTES AND SUMMARIIES, ALL YOU NEED

GEORGIA TECH BUNDLE, ALL ISYE 6501 EXAMS, HOMEWORKS, QUESTIONS AND ANSWERS, NOTES AND SUMMARIIES, ALL YOU NEED

By bundleHub Solution guider 1 year ago

$60

59  

Reviews( 0 )

$6.00

Add to cart

Instant download

Can't find what you want? Try our AI powered Search

OR

REQUEST DOCUMENT
94
0

Document information


Connected school, study & course


About the document


Uploaded On

Sep 03, 2022

Number of pages

19

Written in

Seller


seller-icon
bundleHub Solution guider

Member since 2 years

313 Documents Sold


Additional information

This document has been written for:

Uploaded

Sep 03, 2022

Downloads

 0

Views

 94

Document Keyword Tags

More From bundleHub Solution guider

View all bundleHub Solution guider's documents »
What is Browsegrades

In Browsegrades, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Browsegrades · High quality services·