## "Fossies" - the Fresh Open Source Software Archive

### Member "gretl/scripts/greene/greene15_3.inp" (17 Nov 2020, 1073 Bytes) of package /windows/misc/gretl-2020e-win32.zip:

As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Charmm source code syntax highlighting (style:

standard) with prefixed line numbers.
Alternatively you can here

view or

download the uninterpreted source code file.

1 # Groupwise heteroskedasticity analysis using the Grunfeld
2 # investment data (see Greene, 4e, pp. 594-599), including
3 # the inset "Example 15.3"
4
5 open greene13_1.gdt
6
7 # generate panelized variables (stacked time series)
8 scalar n = $nobs
9 series It = stack(I_*, n)
10 series Ft = stack(F_*, n)
11 series Ct = stack(C_*, n)
12
13 # first, treat as if plain cross-sectional regression
14 setobs 1 1 --cross
15 ols It 0 Ft Ct
16
17 # note: "robust" below gives regular White's standard errors
18 ols It 0 Ft Ct --robust
19
20 # Run White's test
21 modtest --white --quiet
22
23 # Now treat as panel
24 setobs 20 1:1 --stacked-time
25
26 # OLS estimates should be exactly as above
27 ols It 0 Ft Ct
28
29 # With the dataset defined as a panel, "robust" produces Arellano-type
30 # HAC estimates by default
31 ols It 0 Ft Ct --robust
32
33 # For comparison with Greene, show Beck and Katz "Panel Corrected
34 # Standard Errors" (these are not robust with respect to autocorrelation)
35 set pcse on
36 ols It 0 Ft Ct --robust
37
38 # groupwise wls
39 panel It 0 Ft Ct --unit-weights
40 # iterate to ML solution
41 panel It 0 Ft Ct --unit-weights --iterate --verbose
42