File: nc_crime.inp

package info (click to toggle)
gretl 2021a-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 57,556 kB
  • sloc: ansic: 394,030; sh: 4,494; makefile: 2,856; cpp: 2,776; xml: 590; perl: 364
file content (43 lines) | stat: -rw-r--r-- 1,019 bytes parent folder | download | duplicates (6)
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
40
41
42
43
/* 
  Replicate three of the models estimated by Baltagi
  (Econometric Analysis of Panel Data, 3e, chapter 7),
  based on North Carolina crime panel data from Cornwell 
  and Trumbull
*/

set messages off
include ivpanel.gfn

open nc_crime.gdt --quiet

# primary regressors
list X = lprbarr lprbconv lprbpris lavgsen lpolpc ldensity \
 lwcon lwtuc lwtrd lwfir lwser lwmfg lwfed lwsta lwloc lpctymle
# time-invariant regressors
list invariant = lpctmin west central urban
# time dummies
list TD = d82 d83 d84 d85 d86 d87
# endogenous regressors
list Endo = lpolpc lprbarr
# instruments
list Inst = ltaxpc lmix

# fixed effects: can use time dummies
list FX = X TD
list FZ = FX - Endo Inst
# Fixed-effects TSLS
ivpanel(lcrmrte, FX, FZ, 1)

# between: exclude time dummies but add time-invariant series
list BX = X invariant
list BZ = BX - Endo Inst
# Between TSLS
ivpanel(lcrmrte, BX, BZ, 2)

# random effects (G2SLS): use all regressors
list RX = X invariant TD
list RZ = RX - Endo Inst
ivpanel(lcrmrte, RX, RZ, 3)