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

### Member "gretl/scripts/misc/pensions.inp" (2 Oct 2015, 1727 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 /*
2 Replicate the results in Wooldridge, Econometric Analysis of
3 Cross Section and Panel Data, section 15.10, using pension-
4 plan data from Papke (AER, 1998).
5
6 The dependent variable, pctstck (percent stocks), codes the
7 asset allocation responses of "mostly bonds", "mixed" and
8 "mostly stocks" as {0, 50, 100}.
9
10 The independent variable of interest is "choice", a dummy
11 indicating whether individuals are able to choose their own
12 asset allocations.
13 */
14
15 open pension.gdt
16
17 # demographic characteristics of participant
18 list DEMOG = age educ female black married
19 # dummies coding for income level
20 list INCOME = finc25 finc35 finc50 finc75 finc100 finc101
21
22 # Papke's OLS approach
23 ols pctstck const choice DEMOG INCOME wealth89 prftshr
24 # save the OLS choice coefficient
25 choice_ols = $coeff(choice)
26
27 # estimate ordered probit
28 probit pctstck choice DEMOG INCOME wealth89 prftshr
29
30 k = $ncoeff
31 matrix b = $coeff[1:k-2]
32 a1 = $coeff[k-1]
33 a2 = $coeff[k]
34
35 /*
36 Wooldridge illustrates the 'choice' effect in the ordered
37 probit by reference to a single, non-black male aged 60,
38 with 13.5 years of education, income in the range $50K - $75K
39 and wealth of $200K, participating in a plan with profit
40 sharing.
41 */
42 matrix X = {60, 13.5, 0, 0, 0, 0, 0, 0, 1, 0, 0, 200, 1}
43
44 # with 'choice' = 0
45 scalar Xb = (0 ~ X) * b
46 P0 = cdf(N, a1 - Xb)
47 P50 = cdf(N, a2 - Xb) - P0
48 P100 = 1 - cdf(N, a2 - Xb)
49 E0 = 50 * P50 + 100 * P100
50
51 # with 'choice' = 1
52 Xb = (1 ~ X) * b
53 P0 = cdf(N, a1 - Xb)
54 P50 = cdf(N, a2 - Xb) - P0
55 P100 = 1 - cdf(N, a2 - Xb)
56 E1 = 50 * P50 + 100 * P100
57
58 printf "\nWith choice, E(y) = %.2f, without E(y) = %.2f\n", E1, E0
59 printf "Estimated choice effect via ML = %.2f (OLS = %.2f)\n", E1 - E0,
60 choice_ols
61
62