File: camtriv_chap14.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 (18 lines) | stat: -rw-r--r-- 655 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Hansl program replication of IV probit 
# example contained in chapter 14 of
# "Microeconometrics Using Stata, Revised Edition" 
# by A. Colin Cameron and Pravin K. Trivedi (2010)
  
open camtriv_chap14.gdtb --quiet
include HIP.gfn

# Heteroskedastic probit using ML estimator (p.456)
list xlist = const retire age hstatusg hhincome educyear married hisp
HIP(ins, xlist, null, null, chronic, 1, 1)

# Endogenous probit using ML estimator (p.468)
series linc = log(hhincome)
series age2 = age^2
list xlist2 = const female age age2 educyear married hisp white chronic adl hstatusg
list ivlist2 = retire sretire
HIP(ins, xlist2, linc, ivlist2, null, 2, 2)