Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
Econ 3818
R data project
Unlike your other R assignments, this assignment is individual work only. You may discuss your project with classmates but you must have your own unique project..
Final write-up is due via email by 5 pm on Monday, April 22. You will need to turn in a pdf including your written answers, R code and R output where asked to do so. You do not need to print this project.
Often data comes unstructured. There is a bit of work to do before you can readily apply the concepts learned in this course. To receive credit for a project you will complete the following.
1)Load a data set into R. This can be any data set that has at least two quantitative variables and one qualitative variable and can be used to complete the rest of this assignment.
a)If you have an interest (chess, avocados, climate change), this is a great opportunity to explore that topic. Or just browse some data sets like this one. I listed potential data sources at the end of this pdf. Look for data that is “.csv” file type.
b)If you do not have an interest in mind, you can use the default data set from the 2016 American Community Survey from Colorado. It is located on desire to learn as “ACS_2016_CO.csv” with an accompanying codebook describing the variable values. NOTE: the default data set is nice to have, but a lot of the variables are top coded as 9999* because the information is missing. This isn’t valuable data when calculating statistics or creating plots and should not be used! (the command subset(-) in R is helpful for dealing with this)
2)Describe the data set with words. How many variables are there? How many observations? What is the unit of observation for the data set (person-year, state, month)? Is this a cross-section, or multiple observations overtime? Do we have repeated observations for the same subject? Describe a few key variables that you will use in your data set including their units (feet, miles, $).
3)Summarize one of the quantitative variables for the full sample using sample statistics. Then, summarize the same quantitative variable for a subset the observations that meet a specific condition. (e.g. report the average, and standard deviation, monthly price of avocados in 20 major cities in the US from 2010 to 2015, then summarize the avocado price for all 20 cities only in the month of February). Try to choose the subsample in a way that is meaningful. How do the summary statistics compare and what do you learn from that? Include R code and output here.
4)Create a histogram of the variable that you summarize in part 3 with properly labeled axis and title. (Bonus points if you can create two histograms of the same variable, split by some other variable, that are strikingly different). Include R output here.
5)Calculate a confidence interval. You can choose to calculate a confidence interval of one variable or a difference of means confidence interval. Pick something interesting to you and interpret your findings. Include your R code here and output here.
6)Formalize a hypothesis you wish to test with these data (e.g. is the average salary from men the same as the average salary for women?). You might not have all the knowledge to test the exact hypothesis you are interested in. You will mostly be interested in doing a difference of means test. Or if the mean of a variable is equal to a specific value.
7)Conduct the hypothesis test at the level of significance and interpret your results in a meaningful way. Include your R code and output here.
8)Visualize at least two variables from the data set using a two-dimensional plot with an appropriate title, axis labels, and legend. The goal is for this image to tell a story that is clear to the reader. A useful visualization here could be a scatterplot involving two quantitative variables. (Bonus points if you can incorporate a third variable into the plot using another dimension, think color, shape, line thickness, etc). While not necessary, this is a great opportunity to become familiar with ggplot(-). Include R code and output here.
9)Finally, think and write about who would be a good “consumer” of this information. Who would be interested in the facts you present here, and how you could improve the analysis in the future by incorporating new data or using the existing data to answer a more interesting question.