class: center, middle, inverse, title-slide # IDS 702: Module 7.4 ## Time series analysis (illustration) ### Dr. Olanrewaju Michael Akande --- ## FTSE 100 ```r ftse100 <- read.csv("data/ftse2018.csv", header = T) ftse100 <- ftse100[nrow(ftse100):1,] dim(ftse100) ``` ``` ## [1] 211 5 ``` ```r head(ftse100) ``` ``` ## Date Open High Low Close ## 211 1/10/2018 7731.02 7756.11 7716.21 7748.51 ## 210 1/11/2018 7748.51 7768.96 7734.64 7762.94 ## 209 1/12/2018 7762.94 7792.56 7752.63 7778.64 ## 208 1/15/2018 7778.64 7783.61 7763.43 7769.14 ## 207 1/16/2018 7769.14 7791.83 7740.55 7755.93 ## 206 1/17/2018 7755.93 7755.93 7711.11 7725.43 ``` --- ## Sunspots and melanoma ```r cancersun <- read.csv("data/melanoma.csv", header = T) names(cancersun) = c("year", "melanoma", "sunspot") str(cancersun) ``` ``` ## 'data.frame': 37 obs. of 3 variables: ## $ year : int 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 ... ## $ melanoma: num 1 0.9 0.8 1.4 1.2 1 1.5 1.9 1.5 1.5 ... ## $ sunspot : num 40 115 100 80 60 40 23 10 10 25 ... ``` ```r head(cancersun) ``` ``` ## year melanoma sunspot ## 1 1936 1.0 40 ## 2 1937 0.9 115 ## 3 1938 0.8 100 ## 4 1939 1.4 80 ## 5 1940 1.2 60 ## 6 1941 1.0 40 ``` --- class: center, middle # In-class analysis: move to the R script [here](https://ids702-f21.olanrewajuakande.com/slides/TS_examples.R) --- class: center, middle # What's next? ### Move on to the readings for the next module!