EC252 Assignment
更新时间:2024-05-30 16:06: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 Assignment05-30
区统计局关于2023年工作情况和2023年工作规划范文03-22
日语专业介绍02-08
自动售饭机的设计03-28
知识竞赛105-14
初一语文试题及答案01-26
防止电力生产事故的二十五项重点要求02-29
新目标初中英语课件初一第二单元04-20
超市收银系统设计与实现-参考模板04-14
- 小学生造句大全
- 增压泵投资项目可行性研究报告(模板)
- 高中语文人教版粤教版必修1-5全部文言文知识点归纳
- 两学一做专题民主生活会组织生活会批评与自我批评环节个人发言提
- 管理处环境保洁工作操作标准作业指导书
- 2012六一儿童节活动议程 - 图文
- 移树申请报告
- 《贵州省市政工程计价定额》2016定额说明及计算规则
- 计算机长期没有向WSUS报告状态
- 汉语拼音教学策略研究
- 发展西部领先的航空货运枢纽
- 司法所上半年工作总结4篇
- 如何提高银行服务水平
- 发电厂各级人员岗位职责
- 丰田汽车的外部环境分析
- 2017—2018年最新冀教版四年级数学下册《混合运算》教案精品优质
- 中建八局样板策划 - 图文
- 戚安邦《项目管理学》电子书
- 2015年高级项目经理笔记
- 弯桥的设计要点
- Assignment
- EC252
- 百年震撼演讲
- 汽车理论第五版课后习题答案 - 图文
- 锦程网大学生职业生涯规划一
- 最美教师先进个人事迹材料(小学老师)与最美青年志愿者先进事迹
- 小学学校精准扶贫工作实施方案
- 二年级体育30米快速跑教学设计 - 图文
- 最新管理层声明书-财务报表审计
- 工程劳务招标文件示范文本
- 大连“城市家书”彰显城市文化2011年10月30日
- 北师大版小学二年级下册数学《搭一搭(二)》教学设计
- c语言程序设计atm自动取款机实验报告
- 三年级 上册 人文与社会教案
- 企业并购成本的战略效益分析
- AHD硬盘录像机四路参数
- 客舱安全管理
- 考点54 坐标系与参数方程
- 2017届高三数学一轮复习微专题线性规划与基本不等式第5节含参线
- 2017年依法治校工作总结
- 专业建设和各项教学改革的思路和措施
- 重商主义浅析