Does anyone know about STATA commands of this? especially the if men completed e
ID: 3180973 • Letter: D
Question
Does anyone know about STATA commands of this? especially the if men completed exactly 12 years part
. sum educ, detail
highest grade completed by 1991
-------------------------------------------------------------
Percentiles Smallest
1% 8 6
5% 9 6
10% 10 7 Obs 1,193
25% 12 7 Sum of Wgt. 1,193
50% 12 Mean 13.03437
Largest Std. Dev. 2.346208
75% 15 20
90% 16 20 Variance 5.50469
95% 17 20 Skewness .4375011
99% 20 20 Kurtosis 3.501292
. tab educ
highest |
grade |
completed |
by 1991 | Freq. Percent Cum.
------------+-----------------------------------
6 | 2 0.17 0.17
7 | 2 0.17 0.34
8 | 28 2.35 2.68
9 | 41 3.44 6.12
10 | 47 3.94 10.06
11 | 58 4.86 14.92
12 | 498 41.74 56.66
13 | 91 7.63 64.29
14 | 67 5.62 69.91
15 | 203 17.02 86.92
16 | 63 5.28 92.20
17 | 46 3.86 96.06
18 | 18 1.51 97.57
19 | 13 1.09 98.66
20 | 16 1.34 100.00
------------+-----------------------------------
Total | 1,193 100.00
.
. tab motheduc
highest |
grade, |
mother | Freq. Percent Cum.
------------+-----------------------------------
0 | 1 0.08 0.08
3 | 1 0.08 0.17
4 | 2 0.17 0.34
5 | 5 0.42 0.75
6 | 14 1.17 1.93
7 | 12 1.01 2.93
8 | 38 3.19 6.12
9 | 44 3.69 9.81
10 | 61 5.11 14.92
11 | 67 5.62 20.54
12 | 661 55.41 75.94
13 | 52 4.36 80.30
14 | 66 5.53 85.83
15 | 28 2.35 88.18
16 | 110 9.22 97.40
17 | 11 0.92 98.32
18 | 10 0.84 99.16
19 | 5 0.42 99.58
20 | 5 0.42 100.00
------------+-----------------------------------
Total | 1,193 100.00
. tab fatheduc
highest |
grade, |
father | Freq. Percent Cum.
------------+-----------------------------------
0 | 3 0.25 0.25
1 | 1 0.08 0.34
2 | 1 0.08 0.42
3 | 3 0.25 0.67
4 | 11 0.92 1.59
5 | 7 0.59 2.18
6 | 21 1.76 3.94
7 | 19 1.59 5.53
8 | 75 6.29 11.82
9 | 44 3.69 15.51
10 | 75 6.29 21.79
11 | 60 5.03 26.82
12 | 454 38.06 64.88
13 | 48 4.02 68.90
14 | 91 7.63 76.53
15 | 24 2.01 78.54
16 | 139 11.65 90.19
17 | 28 2.35 92.54
18 | 44 3.69 96.23
19 | 10 0.84 97.07
20 | 35 2.93 100.00
------------+-----------------------------------
Total | 1,193 100.00
.
In this question, we are interested in the determinants of years of schooling. Use the data set HTV.dta for this question. The data set includes information on education, ability, parents' education, and several other variables for men in 1991. a) Load the data set in Stata (via the use command). First, use the sum, detail command to show the range of values that the education variable takes in the sample. Second, use the gen command to create a dummy variable that equals 1 if men completed exactly 12 years of education and equals 0 otherwise. Third, use the tab command to show what percentage of men completed exactly 12 years of education. Fourth, use the sum command to determine whether the men or their parents have higher levels of education. b) Use the reg command to estimate the regression model: educ_i = beta_0 + beta_1 motheduc_i + beta_2 fatheduc_i + u_i Make sure to use heteroskedasticity-robust standard errors. How much of the variation in educ is explained by parents' education? Interpret the coefficient on motheduc. c) Add the variable abil (a measure of cognitive ability) to the model in part (b). Does ability help to explain variation in education, even after controlling for parents' education? Use at least one test statistic to justify your answer.Explanation / Answer
*Part-A
*Load data in C-directory
use "C:HTV.dta", clear
sum educ,detail
gen men12 = 0
replace men12 = 1 if educ==12 & gender="men"
replace men12 = . if missing(educ)|missing(gender)
tab men12
sum educ motheduc fatheduc if gender="men"
*Part-B
regress educ motheduc fatheduc, vce(robust)
*Part-C
regress educ motheduc fatheduc abil, vce(robust)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.