************************************************************** * Open a new log file. ************************************************************** ************************************************************** * a. Online, go to * http://wps.aw.com/aw_stock_ie_3/178/45691/11696965.cw/index.html * On the left of the page, click on "Data for Empirical * Exercises and Test Bank". Download the Guns Data (Stata * Dataset); that is, save the file to your computer. * Open this dataset is Stata. Using that dataset, answer * the following questions. Note: Below is the command * needed to access this dataset from the web without * downloading it. This is for future reference. use http://wps.aw.com/wps/media/objects/11422/11696965/empirical/empex_tb/Guns.dta * If you ever want to use this command to get data from * the web, simply find the dataset, write "use" and input * the link location rom online. ************************************************************** ************************************************************** * b. How many observations are in this dataset? Write the * command you used below. ************************************************************** ************************************************************** * c. Explain what the variable "incarc_rate" means? There are * two ways to get this information. Below, please write the * command which gives you this information, and please * describe the other location where you can find it. ************************************************************** ************************************************************** * d. In the data editor, reorder the variables so that * stateid and year are the first and second variables, * respectively, and the rest of the variables follow in any * order. There are two ways to accomplish this. Below, * please write the command you can use. Please also * describe how to manually order the variables. ************************************************************** ************************************************************** * e. Sort the data by stateid and year. Place the command you * used below. Notice how the data has changed by looking * at your data browser: stateid and year are first in the * columns, and all of the years are ordered sequentially * within each state. ************************************************************** ************************************************************** * f. What is the average violent crime rate in state 1? What * command did you use? Place the command and the answer * below. Note: Remember to use a condition in your command, * as it will help you get the correct answer. ************************************************************** ************************************************************** * g. The variable "shall" is coded 1 if the state has a law * allowing citizens to carry concealed weapons in that year * and 0 if the state does not have this law. In state 4, * what percentage of years did the state have a shall * carry law? Once again, place the command and the answer * below. Remember also to think of conditional commands. ************************************************************** ************************************************************** * 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. **************************************************************