Stata 02 04timeseriesanalysis 120605154536 Phpapp02

  • View
    6

  • Download
    2

Embed Size (px)

DESCRIPTION

Stata Time series analysis

Transcript

STATA - Time Series Analysis

STATA: Data Analysis Software

www.STATA.org.uk

Step-by Step Screenshot Guides to help you use STATA

Not affiliated with Stata Corp.

STATATime Series Analysis

1

Datasets Used in TutorialDatasets in these tutorials are based on examples in:Stock and Watson (2006) Introduction to EconometricsYou can obtain all of the datasets used in these tutorials by downloading a STATA command file from http://www.stata.org.uk/download-examples.html

2

OutlineStatistical AnalysisTime SeriesManaging Time Series DataDickey-Fuller TestARIMAVARARCH

3

OutlineStatistical AnalysisTime SeriesManaging Time Series DataOpen DatasetSet Time VariableGraph DataCreate LagsCreate LeadsCreate Differences

4

5

6

7

8

OutlineStatistical AnalysisTime SeriesManaging Time Series DataOpen DatasetSet Time VariableGraph DataCreate LagsCreate LeadsCreate Differences

9

10

11

12

OutlineStatistical AnalysisTime SeriesManaging Time Series DataOpen DatasetSet Time VariableGraph DataCreate LagsCreate LeadsCreate Differences

13

14

15

16

17

18

OutlineStatistical AnalysisTime SeriesManaging Time Series DataOpen DatasetSet Time VariableGraph DataCreate LagsCreate LeadsCreate Differences

19

20

21

OutlineStatistical AnalysisTime SeriesManaging Time Series DataOpen DatasetSet Time VariableGraph DataCreate LagsCreate LeadsCreate Differences

22

23

24

OutlineStatistical AnalysisTime SeriesManaging Time Series DataOpen DatasetSet Time VariableGraph DataCreate LagsCreate LeadsCreate Differences

25

26

27

28

29

30

OutlineStatistical AnalysisTime SeriesManaging Time Series DataDickey-Fuller TestARIMAVARARCH

31

OutlineStatistical AnalysisTime SeriesDickey-Fuller TestDF Test on a variableDF Test on differenced variable

32

33

34

35

OutlineStatistical AnalysisTime SeriesDickey-Fuller TestDF Test on a variableDF Test on differenced variable

36

37

38

39

OutlineStatistical AnalysisTime SeriesManaging Time Series DataDickey-Fuller TestARIMAVARARCH

40

OutlineStatistical AnalysisTime SeriesARIMAARIMA EstimationPartial Correlogram (PAC)Correlogram (AC)Info Criteria (AIC and BIC)Challenge

41

42

43

44

OutlineStatistical AnalysisTime SeriesARIMAARIMA EstimationPartial Correlogram (PAC)Correlogram (AC)Info Criteria (AIC and BIC)Challenge

45

46

47

48

OutlineStatistical AnalysisTime SeriesARIMAARIMA EstimationPartial Correlogram (PAC)Correlogram (AC)Info Criteria (AIC and BIC)Challenge

49

50

51

52

OutlineStatistical AnalysisTime SeriesARIMAARIMA EstimationPartial Correlogram (PAC)Correlogram (AC)Info Criteria (AIC and BIC)Challenge

53

54

55

56

57

58

59

60

OutlineStatistical AnalysisTime SeriesARIMAARIMA EstimationPartial Correlogram (PAC)Correlogram (AC)Info Criteria (AIC and BIC)Challenge

61

ARIMA: ChallengeChallengeEstimate ARIMA(2,0,2) for inflation MethodUse current dataGenerate inflation = (punew-L1.punew)/L1.punewRun Dickey-Fuller on inflationUse PAC and AC graphsUse AIC and BIC tests on ARIMA(3,0,2)Compare to AIC and BIC on ARIMA(2,0,2)

62

63

64

65

66

67

68

69

70

OutlineStatistical AnalysisTime SeriesManaging Time Series DataDickey-Fuller TestARIMAVARARCH

71

OutlineStatistical AnalysisTime SeriesVARDeclare Time VariableVAR Regression (Dinflation vs Unemployment)Joint Significance TestVAR Forecast CalculationsVAR Forecast GraphsChallenge

72

73

74

OutlineStatistical AnalysisTime SeriesVARDeclare Time VariableVAR Regression (Dinflation vs Unemployment)Joint Significance TestVAR Forecast CalculationsVAR Forecast GraphsChallenge

75

76

77

78

79

80

81

82

83

OutlineStatistical AnalysisTime SeriesVARDeclare Time VariableVAR Regression (Dinflation vs Unemployment)Joint Significance TestVAR Forecast CalculationsVAR Forecast GraphsChallenge

84

85

86

87

OutlineStatistical AnalysisTime SeriesVARDeclare Time VariableVAR Regression (Dinflation vs Unemployment)Joint Significance TestVAR Forecast CalculationsVAR Forecast GraphsChallenge

88

89

90

91

92

93

OutlineStatistical AnalysisTime SeriesVARDeclare Time VariableVAR Regression (Dinflation vs Unemployment)Joint Significance TestVAR Forecast CalculationsVAR Forecast GraphsChallenge

94

95

96

97

98

OutlineStatistical AnalysisTime SeriesVARDeclare Time VariableVAR Regression (Dinflation vs Unemployment)Joint Significance TestVAR Forecast CalculationsVAR Forecast GraphsChallenge

99

VAR: ChallengeChallengeForecast unemployment using VAR with 4 lagsMethodUse current dataRun VAR with 4 lagsForecast 20 steps ahead

100

101

102

103

104

OutlineStatistical AnalysisTime SeriesManaging Time Series DataDickey-Fuller TestARIMAVARARCH

105

OutlineStatistical AnalysisTime SeriesARCHARCH EstimationConditional VarianceConditional St. DeviationChallenge

106

107

108

109

OutlineStatistical AnalysisTime SeriesARCHARCH EstimationConditional VarianceConditional St. DeviationChallenge

110

111

112

113

OutlineStatistical AnalysisTime SeriesARCHARCH EstimationConditional VarianceConditional St. DeviationChallenge

114

115

116

117

118

119

OutlineStatistical AnalysisTime SeriesARCHARCH EstimationConditional VarianceConditional St. DeviationChallenge

120

GARCH: ChallengeChallengeEstimate a GARCH(2,2) modelMethodUse current dataRun GARCH(2,2)Save conditional variance

121

122

123

124

125

126

127

128

www.STATA.org.ukIf you visit www.STATA.org.uk you can download tutorials on these other topics:

Data ManagementStatistical AnalysisImporting DataSummary StatisticsGraphsLinear RegressionsPresenting OutputPanel RegressionsMerge or Drop DataTime Series AnalysisInstrumental VariablesProbit Analysis

129