In: Statistics and Probability
Load the regression data in the file called wagedata.csv and answer the following questions:
(a) Create an interaction between Ability and PhD
(b) Run a regression with the interaction a constant Ability and PhD. Write down you estimators and the t-statistics
(c) Compute the difference-in-difference estimate and write down you answer.
(d) Test if the difference is significant by showing relevant steps, and write down the conclusion to the test.
Wage |
Ability |
Phd |
3.52942833628898 |
2.57892317214096 |
1 |
11.5241044105103 |
0.217444617867018 |
1 |
6.43708200805673 |
-1.87272626133237 |
1 |
-3.32998520783711 |
3.76202232083705 |
1 |
5.36855439782834 |
2.45761717163884 |
1 |
4.68954400067837 |
3.7301993415098 |
1 |
1.53267822456788 |
11.1874554691197 |
1 |
9.10512634961242 |
14.776972741187 |
1 |
15.1980826548641 |
8.04953747508578 |
1 |
-0.974975683769769 |
15.0886996846141 |
1 |
-2.27397066450858 |
14.1018765774721 |
1 |
4.07844378728811 |
18.0404548280347 |
1 |
2.91124460624012 |
16.146272599743 |
1 |
0.639521049463678 |
15.1627671917362 |
1 |
3.87999908956868 |
14.4806487625393 |
1 |
0.86624292704353 |
17.1927478743176 |
1 |
1.274343525654 |
12.2506520697683 |
1 |
12.2440679213768 |
7.03907961805346 |
1 |
4.62183553362942 |
12.3302790116668 |
1 |
-5.80284504254266 |
19.5789275529377 |
1 |
-4.30925497568042 |
24.1056351458815 |
1 |
-2.540612755397 |
33.9056390962157 |
1 |
4.61808124007202 |
27.0868971199435 |
1 |
-6.09378187954794 |
23.4770820717889 |
1 |
1.89284719138658 |
23.6506044409556 |
1 |
-3.57578516914426 |
30.0878257593232 |
1 |
-10.4832960381058 |
27.7379587998238 |
1 |
-4.23469650902542 |
26.0756352330111 |
1 |
0.32636023954342 |
25.3765945327823 |
1 |
-2.14382778065676 |
19.8725582444871 |
1 |
-6.49958909150258 |
35.6254259276013 |
1 |
-4.2123776901225 |
38.4425354882262 |
1 |
-9.93866128806339 |
26.3440031742927 |
1 |
-10.8848237411726 |
39.371788202531 |
1 |
-14.5898267483555 |
41.7790947678189 |
1 |
31.9672982079939 |
28.1874684151412 |
0 |
53.0399296766834 |
40.9782587746505 |
0 |
41.9762536303933 |
36.3474948524008 |
0 |
41.4195063143274 |
35.3147598374969 |
0 |
66.3803136922626 |
46.7735149473553 |
0 |
51.020150726321 |
42.441586812062 |
0 |
55.1426542676839 |
37.1127928048265 |
0 |
42.0002523740924 |
36.2514856675758 |
0 |
58.9807345842352 |
42.0202531433013 |
0 |
49.1566524898706 |
44.1867225082533 |
0 |
63.6602309428108 |
50.8654657866704 |
0 |
64.4549685409955 |
47.1389281386783 |
0 |
64.2523581270013 |
50.5426848501408 |
0 |
57.6322627991752 |
49.8164124706117 |
0 |
59.2379083072777 |
45.4707627503926 |
0 |
75.0097119730034 |
58.6045656879896 |
0 |
72.0414413343758 |
56.9033438179064 |
0 |
60.11541218912 |
46.490135284302 |
0 |
82.3487653047187 |
62.9586420142269 |
0 |
71.7931186135558 |
54.710408977031 |
0 |
73.2218390933929 |
55.4135631594282 |
0 |
80.1643459284332 |
65.0883281938915 |
0 |
89.6605408631406 |
67.0526293063506 |
0 |
77.6714308086706 |
59.1652498150208 |
0 |
60.1866041058332 |
52.6935105007023 |
0 |
78.8931332800096 |
63.853165068676 |
0 |
75.6680771247174 |
65.9387678255181 |
0 |
91.350499040367 |
69.2295415546537 |
0 |
79.2193601260624 |
65.3677494814196 |
0 |
82.2098222546892 |
69.4671573562542 |
0 |
76.0164190216985 |
69.245488783903 |
0 |
83.1686288653623 |
69.5506074646669 |
0 |
87.8263238377056 |
74.064957110444 |
0 |
90.5135137636898 |
74.1568120165115 |
0 |
92.5954649559386 |
73.4822071147249 |
0 |
107.674755182245 |
74.566781189438 |
0 |
89.9950131910464 |
72.2801914267274 |
0 |
97.4615796572152 |
76.6063161465292 |
0 |
105.708466642139 |
76.7970200186916 |
0 |
88.7188928120122 |
72.2666282430883 |
0 |
107.460432925572 |
78.9891028126621 |
0 |
100.817186976305 |
80.7244942614467 |
0 |
95.4164293622049 |
83.2000481949651 |
0 |
98.2242952265557 |
80.5249862903271 |
0 |
101.74649150486 |
81.7876152620241 |
0 |
120.114427097958 |
83.9020330907207 |
0 |
105.321989123658 |
85.2532850888778 |
0 |
92.8089874267733 |
75.5563434470352 |
0 |
104.382782310878 |
80.6783286434761 |
0 |
102.334140991132 |
82.7305998908955 |
0 |
113.219858886703 |
89.4615028214495 |
0 |
99.6334461954748 |
79.9346366347533 |
0 |
97.6623079623431 |
85.2233221804249 |
0 |
133.049229396789 |
98.3074188253643 |
0 |
125.524235994978 |
98.8716498346646 |
0 |
110.136953858669 |
89.7559456979701 |
0 |
121.235963787882 |
97.8541667388593 |
0 |
108.441898301419 |
95.9326418499836 |
0 |
125.632137997864 |
98.3088827726876 |
0 |
120.143232384763 |
97.9600091543673 |
0 |
117.697955727987 |
97.297574476134 |
0 |
112.051373301533 |
89.4706843427284 |
0 |
125.352843080085 |
101.125171811127 |
0 |
107.445393968235 |
93.5846018140228 |
0 |
123.668736337728 |
102.649631689373 |
0 |
a) By using the scatter plot we can identify the relation between the Ability and Phd.
From the above plot, we can say that if the ability of students increases then the chances of he pursued PhD is decreased.
i.e. Negative correlation in ability and PhD.
b) The Dependent variable in this data is PhD and
Independent variable in wages and Ability
Dependent variable PhD is not continuous it in categorical form
so we used the logistic regression model here,
Model = glm(Phd~Ability+Wage)
Summary.glm(Model)
glm(formula = Phd ~ Ability + Wage)
Coefficients: Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.799626 0.048791 16.389 < 2e-16 ***
Ability 0.004379 0.002086 2.099 0.0384 *
Wage -0.011972 0.001347 - 8.886 3.41e-14 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
The coefficient of wage = - 0.011972
The Coefficient of Ability = 0.004379
Test Hypothesis:
H0: The variable is insignificant
against,
H1: The variable is significant
Test Statistic:
T-statistic is usefull here
t-value of Ability = 2.099
t-value of wage = -8.886
Decision Rule: If p-value greater than 0.05 level of
significance then we accept the null hypothesis.
From the above results, p-values are less than 0.05
we reject the null hypothesis here
i.e. both variable significant
i.e. both variable wage and Ability are important in model.