File: ps10-3.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 (24 lines) | stat: -rw-r--r-- 570 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# PS10.3, for the Breusch-Godfrey LM test for Example 10.4
open data10-2 
genr load1 = load(-1)
# Suppress the first observation 
smpl 1.02 31.24
# Estimate transformed model 
ols load 0 load1 temp
# save residuals 
genr ut=$uhat
# Generate lag values for ut 
genr ut1=ut(-1)
genr ut2=ut(-2)
genr ut3=ut(-3)
genr ut4=ut(-4)
genr ut5=ut(-5)
genr ut6=ut(-6)
# Suppress the first seven observations 
smpl 1.08 31.24
# Estimate the auxiliary regression 
ols ut 0 ut1 ut2 ut3 ut4 ut5 ut6 load1 temp
# compute TR-square statistic and its p-value 
genr LM=$trsq
pvalue X 6 LM