Econ XXXXXXXXXX: Topics in Applied Econometrics Assignment/Report Due:Week 10, 7AM, Monday 12th October 2020 Instructions: • Write your assignment using R Markdown and submit it along with your...

1 answer below »

View more »
Answered Same DayOct 07, 2021Macquarie University

Answer To: Econ XXXXXXXXXX: Topics in Applied Econometrics Assignment/Report Due:Week 10, 7AM, Monday 12th...

Pooja answered on Oct 08 2021
157 Votes
a)
> gsskidvalue <- read.csv("C:/Users/HP/Desktop/gsskidvalue.csv", header=TRUE)
> View(gsskidvalue)
> summary(gsskidvalue)
opinion yr83 male white age ed prst

A :856 Min. :1977 Min. :0.0000 Min. :0.0000 Min. :18.00 Min. : 0.00 Min. :12.00
D :723 1st Qu.:1977 1st Qu.:0.0000 1st Qu.:0.0000 1st Qu.:31.00 1st Qu.:11.00 1st Qu.:30.00
SA:417 Median :1977 Median :0.0000 Median :0.0000 Median :42.00 Median :12.00 Median :37.00
SD:297 Mean :1982 Mean :0.4649 Mean :0.1234 Mean :44.94 Mean :12.22 Mean :39.59
3rd Qu.:1989 3rd Qu.:1.0000 3rd Qu.:0.0000 3rd Qu.:58.00 3rd Qu.:14.00 3rd Qu.:50.00
Max. :1989 Max. :1.0000 Max. :1.0000 Max. :89.00 Max. :20.00 Max. :82.00
b)
> readgender <- table(gsskidvalue$opinion,gsskidvalue$male)
> prop.table(readgender)

0 1
A 0.20104666 0.17226341
D 0.14086350 0.17444396
SA 0.13257741 0.04928042
SD 0.06061928 0.06890536
There are 20% female participants with opinion A. this if followed by 17% males with opinion of A as well as 17% males with opinion of D.
c)
> mylogit <- glm(opinion ~ male, data = gsskidvalue, family = "binomial")
> summary(mylogit)
Call:
glm(formula = opinion ~ male, family = "binomial", data = gsskidvalue)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.4091 -1.3992 0.9622 0.9707 0.9707
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.50778 0.05895 8.614<2e-16 ***
male 0.02210 0.08658 0.255 0.799
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 3029.9 on 2292 degrees of freedom
Residual deviance: 3029.9 on 2291 degrees of freedom
AIC: 3033.9
Number of Fisher Scoring iterations: 4
> myprobit <- glm(opinion ~ male, family = binomial(link = "probit"), data = gsskidvalue)
> summary(myprobit)
Call:
glm(formula = opinion ~ male, family = binomial(link = "probit"),
data = gsskidvalue)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.4091 ...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here
April
January
February
March
April
May
June
July
August
September
October
November
December
2025
2025
2026
2027
SunMonTueWedThuFriSat
30
31
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
1
2
3
00:00
00:30
01:00
01:30
02:00
02:30
03:00
03:30
04:00
04:30
05:00
05:30
06:00
06:30
07:00
07:30
08:00
08:30
09:00
09:30
10:00
10:30
11:00
11:30
12:00
12:30
13:00
13:30
14:00
14:30
15:00
15:30
16:00
16:30
17:00
17:30
18:00
18:30
19:00
19:30
20:00
20:30
21:00
21:30
22:00
22:30
23:00
23:30