library(ggplot2)
library(forecast)
library(plotly)
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
library(ggfortify)
library(tseries)
library(gridExtra)
library(readxl)
bor <- read_excel("C:/Users/amgaa/Desktop/sudalgaa/bor.xlsx", sheet = "utlagat")
saa <- ts(bor$niislel, start=c(2017, 1))
sp <- ts(bor$niislel, start=c(2017, 1), freq=4)
adf.test(sp)
##
## Augmented Dickey-Fuller Test
##
## data: sp
## Dickey-Fuller = -4.0532, Lag order = 2, p-value = 0.0214
## alternative hypothesis: stationary
k<-decompose(sp)
plot(k, col="blue")

autoplot(stl(sp, s.window="periodic", robust=TRUE))
