#----------------------------------------------------------------------------------------------------# # DATA EXERCISE 3 #----------------------------------------------------------------------------------------------------# #----------------------------------------------------------------------------------------------------# # 1. how many variables are contained in the macro dataset ? #----------------------------------------------------------------------------------------------------# #----------------------------------------------------------------------------------------------------# # 2. how many units/observations/records are contained in the macro dataset? #----------------------------------------------------------------------------------------------------# #----------------------------------------------------------------------------------------------------# # 3. What is the function of the following graphical parameters: # col, ylab, xlab, main, lwd, xlim, ylim, cex #----------------------------------------------------------------------------------------------------# #----------------------------------------------------------------------------------------------------# # 4. Why does the cor(macro) command return an error while the cor(macro.variables) does not? #----------------------------------------------------------------------------------------------------# #----------------------------------------------------------------------------------------------------# # 5. Which variables have the highest correlation coefficient? Interpret this in words. # What is the 95% confidence interval around this correlation coefficient? #----------------------------------------------------------------------------------------------------# #----------------------------------------------------------------------------------------------------# # 6. create a loop that creates a dummy variable for the years when # Ronald Regan was president 1981-1989 # HINT: Use an & statement to add a second condition within the if statement #----------------------------------------------------------------------------------------------------# #----------------------------------------------------------------------------------------------------# # 7. Estimate the value of Unemployment when trade and capmob are at # their means and gdp varies from its min to its max and plot the relationship #----------------------------------------------------------------------------------------------------#