File: ps10-5a.inp

package info (click to toggle)
gretl 2016d-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 48,620 kB
  • ctags: 22,779
  • sloc: ansic: 345,830; sh: 4,648; makefile: 2,712; xml: 570; perl: 364
file content (21 lines) | stat: -rw-r--r-- 648 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# PS10.5a, for the Breusch-Godfrey test for AR(24) in
# Application Section 10.6 
open data10-2
genr load1 = load(-1)
# suppress the first observation 
smpl 1.02 31.24
# estimate model with lagged dependent variable 
ols load 0 load1 temp
# Save residuals for Breusch-Godfrey test for AR(24) 
genr ut = $uhat
# generate 24 lags 
lags ut
# Suppress 25 observations 
smpl 2.02 31.24
# Estimate the auxiliary regression 
ols ut 0 load1 temp ut_1 ut_2 ut_3 ut_4 ut_5 ut_6 ut_7 ut_8 ut_9 ut_10 \
ut_11 ut_12 ut_13 ut_14 ut_15 ut_16 ut_17 ut_18 ut_19 ut_20 ut_21 ut_22 \
ut_23 ut_24
# Compute nRsquare statistic and p-value 
genr LM=$trsq
pvalue X 24 LM