I'm a very newbie with R.
I'm currently working on my dissertation using March CPS data (United States).
I find the variable of state unemployment rates is necessary for the completion of my model, but has little idea about how to add it in my dataset.
Currently, the dimension of my raw data is 633534 observations and 61 variables.
I have six separate years 2008
2009
2010
2012
2013
2014
, and 52 states, which means I need 312 unemployment rate inputs for each year and each state.
I know the figure of it from US Bureau of Labor Statistics (https://www.bls.gov/bls/news-release/home.htm#SRGUNE)
How can I add it to my data in a sophisticated way, rather than manually?
Just for your information, I want to see this from View()
as below.
(the gestcen is the variable name for state, and each number is the unique number for state. For example 14 = Massachusetts and 91 = Washington)
h_year gestcen (state) unemployment
1 | 2008 14 7.5
2 | 2008 91 6.3
3 | 2008 14 7.5
4 | 2008 14 7.5
. |
. |
. |
633,534| 2014 88 9.2
Thanks for reading my messed up writing, and thanks in advance for your help!