/* Exercise - Data Structure Run the following command to load a data set from the U.S. Census webuse census.dta, clear - What year were these data collected? - How many observations are there? What is the unit of observation? - Are there any string variables? If so, which are they? - Which variables have variable labels? - Which variables have value labels? - Which variables are categorical? Which are continous measures? Which are indicators? - Where are there missing values in these data? /* Exercise - Elements of Stata Syntax: Create and run a do file using the auto data set. - Write a command to browse domestic cars that get more than 25 miles per gallon and are known to have good repair records (rep78 greater than 3). - Then write a command to browse foreign cars that cost less than $5,000 and are not known to have poor repair records (rep78 less than or equal to 3). When browsing, include the variables used in the conditions so you can spot-check your results. - Explain why you handled missing values the way you did in both commands. */ /* Exercise - Statistics Commands: Create and run a do file using the auto data set. - Find the mean price of cars that get more than 25 miles per gallon. - Next compare that with the mean price of cars that get 25 miles per gallon or less. Did American consumers in 1978 considered good gas mileage a negative or a positive characteristic? In another do file, run the following command to load a data set concerning mothers' health and infants' birth weight. webuse lbw, clear - What type of variable is "low"? What is the proportion of infants with a low birth weight? - What type of variable is "smoke"? What is the proportion of mothers who smoke during pregnancy? - Is there a relationship between smoking status and low birth weight? - What is the average age of a mother in these data? What is the average age for a nonsmoking mother? a mother who smoked during pregnancy? */