联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> OS作业OS作业

日期:2024-03-11 10:22

PS3_Stata: Descrip0ve Sta0s0cs and Graphs .    You will submi+ng a Word document with your answers to the ques8ons and the graphs. Please copy/paste graphs created in STATA into the Word document. .    You do not need to submit your do file. .    Assignments are always due at the beginning of class. Let’s get started! .    Open Stata. .     Begin a do file. Start your do file with the following two lines: .    clear all .    set more off .     Use the cd command to change the working directory to the folder that will contain your data, graphs and do file. (I recommend having a HW2 subfolder) .     Download the data set from Blackboard 8tled “wbdihw2.dta” .    Open this data set in Stata using the appropriate command. 1.    First, remind yourself how your data are organized and what are included as your elements. In the Word file, answer the following: a.   How many countries do you have? b.    How many observa8ons does each country have? Life expectancy and Fer0lity rate: 2.   In this assignment, we would like to explore the variables life expectancy (life_exp) and fer8lity rate (fert_rate). We want to start with some descrip8ve sta8s8cs. Run the appropriate command in STATA to answer the following ques8ons. (Copy/paste Stata output into the Word file). a.   What’s the mean, standard devia8on, min and max for life_exp? b.   What’s the mean, standard devia8on, min and max for fert_rate? 3.   For the two variables life expectancy (life_exp) and fer8lity rate (fert_rate), let’s now compute the median values. Run the appropriate command to compute the median values and report the medians in the Word file. 4.   Let’s now create histograms to understand the distribu8ons a li_le be_er. Create two histograms, one for life_exp and one for fert_rate. a.   Right a`er each graph is created, copy/paste the two graphs into the Word file. b.   Comment on the distribu8on of each variable. Is it symmetric or skewed, and if skewed which direc8on is the skewness? 5.    Now, you will create graphs plo+ng rela8onships between life expectancy and fer8lity rates. Use the “graph twoway” command to create the following graphs. a.    Graph the rela8onship between the two variables for the year 2015 using all countries. Copy/paste the graphs into Word. i. Note that you will need to use the “if” command to tell Stata you only want to plot observa8ons for 2015. ii.  Create the first graph: a sca_erplot of life expectancy against fer8lity rates using “graph twoway” command. iii. Create the second graph: a “line of best fit” (or the trend line), also of life expectancy against fer8lity rates, using “graph twoway” command. b.    Comment on the rela8onship you see in the graphs. Does there seem to be a rela8onship between life expectancy and fer8lity rates in 2015? What is the suggested rela8onship? Offer one possible reason why the rela8onship may be what the graph implies. c.    Now explore the “Graphics” pull-down menu for “two-way” graphs or the op4ons to make your graph pre+er and easier to read. Add a 8tle. Also, label your x and y axis  more clearly. Copy/paste this nicer graph into the word file. 6.    Suppose you instead wanted to see how life expectancy have changed over 8me for the United States. Plo+ng this can show you the 8me trends. Use the “graph twoway” command to create: .    A sca_erplot of life expectancy against year for the United States. Note that you’ll need to use the “if” statement to plot observa8ons only for the United States. Paste the graph into the Word file. Comment on what you see. You’re done! Pre_y cool how Stata can help you understand rela8onships between variables, and how variables change over 8me, all without having to manually and painfully look through the raw data.

版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp