File: hamilton.inp

package info (click to toggle)
gretl 2022c-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 59,552 kB
  • sloc: ansic: 409,074; sh: 4,449; makefile: 3,222; cpp: 2,777; xml: 599; perl: 364
file content (39 lines) | stat: -rw-r--r-- 989 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Replicate James Hamilton's analysis of the relationship
# between the US and Italian price levels and the Dollar
# to Lira exchange rate ("Time Series Analysis", Princeton
# 1994, ch. 20)

open hamilton.gdt

# log of US price level
series p = 100*(log(PZUNEW)-log(PZUNEW[1973:01]))

# log of exchange rate
series s = -100*(log(EXRITL)-log(EXRITL[1973:01]))

# log of Italian price level
series pf = 100*(log(PC6IT)-log(PC6IT[1973:01]))

# Set the sample period used by Hamilton
smpl 1974:2 ;

# Determine cointegration rank
johansen 12 p s pf

# Estimate VECM: lag order 12, cointegration rank 1
Hamilton <- vecm 12 1 p s pf

# First test: Is the middle coefficient zero?  (That is, 
# the cointegrating vector, "beta", involves only the two 
# price levels.)
restrict Hamilton
  b[2] = 0
end restrict --verbose

# Second test: The real exchange rate is stationary, or beta 
# is proportional to (1, -1, -1)'
restrict Hamilton
  b[1] + b[2] = 0
  b[1] + b[3] = 0
end restrict --verbose