************************************************************** * Open a new log file. * Re-download the Guns Data (Stata Dataset). * Re-order the dataset, if you choose. ************************************************************** ************************************************************** * a. The variable "pw1064" is the percent of the state * population that is white, ages 10 to 64. Place a new * name and label on this variable so any person viewing * your dataset will know what this variable is. There are * two ways of renaming and relabeling. Please provide the * two commands below, and explain the process by which * you would manually change this information. ************************************************************** ************************************************************** * b. Create a bar graph of robbery rates in the year 1977 for * all states. Remember to measure by frequency. Write the * command you used below. ************************************************************** ************************************************************** * c. Create a box and whisker plot of robbery rates in the * year 1977 for all states. Write the command you used * below. ************************************************************** ************************************************************** * d. Using the plots from the previous two questions, what can * you conclude about the shape of the distribution? What * is the range of robbery rates that occurred most * frequently in the year 1977? ************************************************************** ************************************************************** * e. Describe how to find the mean of violent crime rates * using the command and the drop-down menus. What is the * command you would use, and the list of menus in the * order that you would click to find this information? * Answer below. ************************************************************** ************************************************************** * f. Using the help function in Stata, provide 3 commands that * you could use that involve the drop command. Please * describe what each of the commands do. Answer below. ************************************************************** ************************************************************** * Give proper credit below to those you worked with and/or * any texts. ************************************************************** ************************************************************** * Close your log. * Please print this .do file with your final answers * and print your log file by going to File>Print in the * Stata command center. ************************************************************** ************************************************************** * FOR FUN (!): After you have saved and printed your work, * trying running this .do file to see if you inputted all * of the syntax correctly. To do this, clear your dataset * from the Stata command center. Then highlight all the * text in this .do file, and click the Execute button on * the .do file toolbar above (the button with the paper * and the arrow located on the far right). You will know * that your syntax was correct if your .do file runs * properly without error. * This is an important skill. Always check to make sure * your .do file executes properly so you have a good * record of all your commands. Keeping the .do file will * save you a lot of time if done properly. **************************************************************