File: ooballot.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 (35 lines) | stat: -rw-r--r-- 895 bytes parent folder | download | duplicates (4)
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
open ooballot

# restrict to 'P' and 'O' countries
smpl Status > 0 --restrict

# split CPI on median
series hicorr = CPI < 3.95

# make binary approval variable (omits abstainers)
series approv = (Vote==0)? 0 : ((Vote>1)? 1 : NA)

# mark the two new variables as discrete
discrete hicorr approv
# and cross-tabulate
xtab hicorr approv

# An econometrician might be more inclined to run a
# regression...
ols Vote 0 CPI

# But of course plain OLS is suspect because "Vote" is not 
# on an interval scale: so try ordered probit
probit Vote 0 CPI

# Normality is strongly rejected so use QML standard errors:
# CPI is still strongly significant
probit Vote 0 CPI --robust

# Compare the rank-sum test given on effi.org, using
# all non-abstaining countries for which CPI is available
smpl --full
series capp = (Vote > 1)? CPI : NA
series cdis = (Vote == 0)? CPI : NA
difftest capp cdis --rank-sum