Analisis Intervensi Data Deret Waktu den
Skripsi-R_LaTeX
Kurnia Wanto
July 12, 2016
Contents
1 Libraries and Import Data
1
2 Pemodelan ARIMA
4
2.1
Plot Nt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
2.2
Box–Cox Transformation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
2.3
Plot Wt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
2.4
Identifikasi Model ARIMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
2.5
Estimasi Parameter ARIMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8
2.6
Diagnosis Model ARIMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
3 Analisis Intervensi
11
3.1
Identifikasi Orde Intervensi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
3.2
Estimasi Parameter Intervensi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
3.3
Diagnosis Model Intervensi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
3.4
Peramalan Model Intervensi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF,
and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
1
Libraries and Import Data
# ------------------------------- Libraries ------------------------------library(forecast)
# --- BoxCox Arima auto.arima function is in forecast package
## Loading required package: zoo
##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
##
as.Date, as.Date.numeric
## Loading required package: timeDate
1
## This is forecast 7.2
library(MASS)
library(FitAR)
# --- boxcox function is in MASS package
# --- LjungBoxTest function is in FitAR package
## Loading required package: lattice
## Loading required package: leaps
## Loading required package: ltsa
## Loading required package: bestglm
##
## Attaching package: 'FitAR'
## The following object is masked from 'package:forecast':
##
##
BoxCox
library(tsoutliers) # --- tso function is in tsoutliers package
library(lmtest)
# --- coeftest function is in lmtest package
library(stargazer) # --- stargazer function is in stargazer package
##
## Please cite as:
##
Hlavac, Marek (2015). stargazer: Well-Formatted Regression and Summary Statistics Tables.
##
R package version 5.2. http://CRAN.R-project.org/package=stargazer
library(TSA)
# --- arimax function is in TSA package
## Loading required package: locfit
## locfit 1.5-9.1
2013-03-22
## Loading required package: mgcv
## Loading required package: nlme
##
## Attaching package: 'nlme'
## The following object is masked from 'package:forecast':
##
##
getResponse
## This is mgcv 1.8-14. For overview type 'help("mgcv-package")'.
2
## Loading required package: tseries
##
## Attaching package: 'TSA'
## The following objects are masked from 'package:forecast':
##
##
fitted.Arima, plot.Arima
## The following objects are masked from 'package:timeDate':
##
##
kurtosis, skewness
## The following objects are masked from 'package:stats':
##
##
acf, arima
## The following object is masked from 'package:utils':
##
##
tar
# ---------------------------- 0_Import_Data.R ---------------------------options(width=80)
raw_data
Kurnia Wanto
July 12, 2016
Contents
1 Libraries and Import Data
1
2 Pemodelan ARIMA
4
2.1
Plot Nt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
2.2
Box–Cox Transformation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
2.3
Plot Wt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
2.4
Identifikasi Model ARIMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
2.5
Estimasi Parameter ARIMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8
2.6
Diagnosis Model ARIMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
3 Analisis Intervensi
11
3.1
Identifikasi Orde Intervensi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
3.2
Estimasi Parameter Intervensi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
3.3
Diagnosis Model Intervensi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
3.4
Peramalan Model Intervensi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF,
and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
1
Libraries and Import Data
# ------------------------------- Libraries ------------------------------library(forecast)
# --- BoxCox Arima auto.arima function is in forecast package
## Loading required package: zoo
##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
##
as.Date, as.Date.numeric
## Loading required package: timeDate
1
## This is forecast 7.2
library(MASS)
library(FitAR)
# --- boxcox function is in MASS package
# --- LjungBoxTest function is in FitAR package
## Loading required package: lattice
## Loading required package: leaps
## Loading required package: ltsa
## Loading required package: bestglm
##
## Attaching package: 'FitAR'
## The following object is masked from 'package:forecast':
##
##
BoxCox
library(tsoutliers) # --- tso function is in tsoutliers package
library(lmtest)
# --- coeftest function is in lmtest package
library(stargazer) # --- stargazer function is in stargazer package
##
## Please cite as:
##
Hlavac, Marek (2015). stargazer: Well-Formatted Regression and Summary Statistics Tables.
##
R package version 5.2. http://CRAN.R-project.org/package=stargazer
library(TSA)
# --- arimax function is in TSA package
## Loading required package: locfit
## locfit 1.5-9.1
2013-03-22
## Loading required package: mgcv
## Loading required package: nlme
##
## Attaching package: 'nlme'
## The following object is masked from 'package:forecast':
##
##
getResponse
## This is mgcv 1.8-14. For overview type 'help("mgcv-package")'.
2
## Loading required package: tseries
##
## Attaching package: 'TSA'
## The following objects are masked from 'package:forecast':
##
##
fitted.Arima, plot.Arima
## The following objects are masked from 'package:timeDate':
##
##
kurtosis, skewness
## The following objects are masked from 'package:stats':
##
##
acf, arima
## The following object is masked from 'package:utils':
##
##
tar
# ---------------------------- 0_Import_Data.R ---------------------------options(width=80)
raw_data