EC252 Assignment
更新时间:2024-07-11 13:59:01 阅读量: 综合文库 文档下载
- ec2525推荐度:
- 相关推荐
Question 1
I issued the command sum health private inc docvis to collect the average, the standard deviation, the minimum value, and the maximum value in the data.
Variable Obs Mean Std. Dev. Min Max health 1116 71.41414 19.34664 4.161454 99.97827 private 1116 .1317204 .3383382 0 1 inc 1116 22746.46 9495.517 2462 61538 docvis 1116 2.882616 4.508251 0 30
Therefore, the average, the standard deviation, the minimum value, and the maximum value of health are respectively 71.41414, 19.34664, 4.161454, and 99.97827.
The average, the standard deviation, the minimum value, and the maximum value of private are respectively 0.1317204, 0.3383382, 0 and 1.
The average, the standard deviation, the minimum value, and the maximum value of inc are respectively 22746.46, 9495.517, 2462 and 61538.
The average, the standard deviation, the minimum value, and the maximum value of inc are respectively 2.882616, 4.508251, 0 and 30.
In addition, there are 1116 observations in the data set.
Question 2
(a) I issued the command: gen loginc=ln(inc) label var loginc \
for generating a new variable loginc as the (natural) logarithm of inc and label this variable.
(b) I issued the command:
lab var private \
for Labelling the indicator variable for private health insurance.
(c) I issued the command:
label define private 0 \ lab val private private tab private
for labelling each value of the variable private appropriately.
(d) I issued the command: tab private
private health insurance Freq. Percent Cum. otherwise 969 86.83 86.83private health insurance 147 13.17 100.00 Total 1,116 100.00
sum health if age>=40 & age <=49 & private==1
Variable Obs Mean Std. Dev. Min Max health 50 75.72246 21.53046 10.37178 99.97827
Therefore, 86.63% of individuals have private health insurance.
The average level of health status is 75.72246 for individuals with private health insurance who are at least 40 and at most 49 years old. (e) I issued the command:
gen incgroup=.
replace incgroup=1 if inc<= 10000
replace incgroup=2 if inc>= 10000 & inc <= 19999 replace incgroup=3 if inc>= 20000 & inc <= 29999 replace incgroup=4 if inc>= 30000 & inc <= 39999 replace incgroup=5 if inc>= 40000 & inc <= 49999
replace incgroup=6 if inc>= 50000 & inc <= 59999 tab incgroup
sum incgroup if inc>= 40000 & inc <= 49999
incgroup Freq. Percent Cum. 1 55 4.95 4.95 2 425 38.22 43.17 3 427 38.40 81.56 4 149 13.40 94.96 5 39 3.51 98.47 6 17 1.53 100.00 Total 1,112 100.00 Variable Obs Mean Std. Dev. Min Max incgroup 39 5 0 5 5Therefore, there are 17 households in the income group 40,000-49,999 EUR.
Question 3
I issued the command: tab female
label define female_lable 0 \lab val female female_lable1 tab female
histogram health if female== 1, name(hist1, replace) histogram health if female== 0, name(hist2, replace)
Density.0050.01.015.02.025204060health80100
Above picture is the histogram of health status for females.
.03Density.010.0202040health6080100 Above picture is the histogram of health for males.
Question 4
I issued the command: correlate health educ
health educ health 1.0000 educ 0.0783 1.0000As you can see, there is not a strong relationship between two variables.
Question 5
(a)I issued the command: regress health age female educ
Source SS df MS Number of obs = 1116 F( 3, 1112) = 13.58 Model 14752.3691 3 4917.45638 Prob > F = 0.0000 Residual 402583.827 1112 362.035816 R-squared = 0.0353 Adj R-squared = 0.0327 Total 417336.196 1115 374.292553 Root MSE = 19.027 health Coef. Std. Err. t P>|t| [95% Conf. Interval] age -.3250652 .0561682 -5.79 0.000 -.4352728 -.2148576 female -.9328762 1.209883 -0.77 0.441 -3.306788 1.441035 educ .423733 .2239645 1.89 0.059 -.0157076 .8631735 _cons 80.50746 3.86767 20.82 0.000 72.91871 88.09622
(b) I issued the command: regress health age female educ if educ>=8 & educ <=11
Source SS df MS Number of obs = 661 F( 3, 657) = 6.00 Model 6316.37179 3 2105.45726 Prob > F = 0.0005 Residual 230695.337 657 351.134454 R-squared = 0.0267 Adj R-squared = 0.0222 Total 237011.708 660 359.108649 Root MSE = 18.739 health Coef. Std. Err. t P>|t| [95% Conf. Interval] age -.3045003 .0749 -4.07 0.000 -.4515726 -.157428 female -1.362423 1.59443 -0.85 0.393 -4.493216 1.76837 educ .3673577 1.082656 0.34 0.734 -1.758525 2.49324 _cons 79.44583 12.13511 6.55 0.000 55.61756 103.2741
(c) I issued the command: regress health age female educ if educ>=12 & educ <=15
Source SS df MS Number of obs = 169 F( 3, 165) = 3.28 Model 3995.078 3 1331.69267 Prob > F = 0.0223 Residual 66894.7695 165 405.422845 R-squared = 0.0564 Adj R-squared = 0.0392 Total 70889.8475 168 421.963378 Root MSE = 20.135 health Coef. Std. Err. t P>|t| [95% Conf. Interval] age -.423569 .1411224 -3.00 0.003 -.7022075 -.1449305 female 1.139752 3.258698 0.35 0.727 -5.29437 7.573874 educ .149646 1.274803 0.12 0.907 -2.367383 2.666675 _cons 87.32038 18.29475 4.77 0.000 51.19838 123.4424
Question 6
(a) I issued the command: gen agem2= age^2 gen agem3= age^3 label var agem2 \label var agem3 \
regress health age agem2 agem3 female educ
Source SS df MS Number of obs = 1116 F( 5, 1110) = 8.96 Model 16194.2493 5 3238.84985 Prob > F = 0.0000 Residual 401141.947 1110 361.389141 R-squared = 0.0388 Adj R-squared = 0.0345 Total 417336.196 1115 374.292553 Root MSE = 19.01 health Coef. Std. Err. t P>|t| [95% Conf. Interval] age .485484 3.166313 0.15 0.878 -5.727149 6.698117 agem2 -.0075369 .0755587 -0.10 0.921 -.1557908 .140717 agem3 -.0000296 .0005829 -0.05 0.960 -.0011732 .0011141 female -.9160576 1.208833 -0.76 0.449 -3.287912 1.455797 educ .4262633 .226685 1.88 0.060 -.018516 .8710427 _cons 63.0898 42.42545 1.49 0.137 -20.15332 146.3329
Question 7
I issued the command: regress health age if educ==11, robust
Question 8
I issued the command:
egen avehealth=mean(health), by(incgroup) graph twoway bar avehealth incgroup
90avehealth70758085123incgroup456
正在阅读:
EC252 Assignment07-11
风控建模常用pandas语句02-22
纺织产品开发学第六到九章02-03
修辞文体学视角下丘吉尔《论希特勒入侵苏联演讲稿》的词汇特点08-06
美国物流发展10-23
小故事201-13
领导科学课后练习及答案04-01
公文写作中的文章结构顺序排列技巧02-22
任务二阶梯轴的加工12-08
上海市青年文明号创建工作手册201205-22
- 多层物业服务方案
- (审判实务)习惯法与少数民族地区民间纠纷解决问题(孙 潋)
- 人教版新课标六年级下册语文全册教案
- 词语打卡
- photoshop实习报告
- 钢结构设计原理综合测试2
- 2014年期末练习题
- 高中数学中的逆向思维解题方法探讨
- 名师原创 全国通用2014-2015学年高二寒假作业 政治(一)Word版
- 北航《建筑结构检测鉴定与加固》在线作业三
- XX县卫生监督所工程建设项目可行性研究报告
- 小学四年级观察作文经典评语
- 浅谈110KV变电站电气一次设计-程泉焱(1)
- 安全员考试题库
- 国家电网公司变电运维管理规定(试行)
- 义务教育课程标准稿征求意见提纲
- 教学秘书面试技巧
- 钢结构工程施工组织设计
- 水利工程概论论文
- 09届九年级数学第四次模拟试卷
- Assignment
- EC252
- 网络试卷(附答案)
- 立体几何教材分析
- 普通高等学校学生党建工作标准(教党8号)
- 六年级行程应用题
- 关于党员干部作风建设的思考和建议
- 97型25HZ轨道电路及ZPW-2000A移频轨道电路测试
- 2017年浦东新区高三数学一模官方定稿版(浦东印稿)
- 创建全国文明城市工作先进个人事迹材料
- 定性研究
- 水处理系统中过滤器的PLC控制系统设计毕业论文
- 综合布线技术方案 - 图文
- 丹徒区上会中心小学小学集体备课制度
- 05-06 1教学反思
- 简答连续X射线产生机理
- 2014年陕西省科技计划申报指南
- 2012中考数学圆的综合复习
- 苏教版五年级下册《只拣儿童多处行》教学设计3
- 科学探究活动中教师指导语运用策略
- 融资租赁的基本特征与优势
- 浅谈秘书时间管理与高效工作的关系毕业论文