Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Social Mobility

Due: March 27

Instructions   Submit a PDF document with the output of a R  Markdown file that answers the following questions. Make sure that your name is included in the file name and at the top of the code. All graph axes should be titled. You are allowed to work with others, but each person needs to submit their own file and solutions arrived at collectively should be noted.

Background   This assignment asks you to consider some aspects of social mobility in early 20th century Florida. I have provided a dataset of linked father-son pairs from Florida, where the father is seen in 1910 and the son in 1940.  Acknowledgments:  I used the wonderful Census Linking Project to generate the father-son links, and IPUMS for the underlying data.

1.  Spend ten minutes or so looking at the data.  What numbers show up a lot, are there any unusual patterns?  Things which would worry you?  Variables which show up as zero a lot which shouldn’t? (No need to write anything here. But it’s good to be in the habit of looking at data to see if there are strange things about them.)

2.  Summarize the ages of the fathers. Notice that the provided dataset includes fathers who are too young to have an occupation yet.  Drop all observations where the father is not yet (in 1910) 25 years old. Then summarize the variable again.

3. There is no information from the census for income in 1910, so we have to use so called “oc- cupational scores”, called occscores.  (This is an average income by occupation, as it happens from 1950).  Notice some people in the data have a zero for an occscore.  These could be treated in different ways, but we will drop them. Drop these individuals, and summarize the fathers’ and sons’ occscores.

4.  One measure of social mobility is whether or not people change social classes. Let’s take the simplest example.  Calculate the fraction of sons of unskilled workers whose sons are in a higher occupational status, separately for white and black (fathers).  An unskilled worker is one with an occ1950” value between 800 and 970 (inclusive). Everything lower is a higher” social class (after excluding zeroes for occscores, which we did above).  (Look up the codes for race on the IPUMS website.)

5. Take the natural log of the occupational scores, and make a scatter plot of the occupational scores of the fathers (on the x-axis) vs those of the sons (on the y-axis).

6. Run the regression of (log) son’s occupation score on (log) father’s score.  Calculate using homoskedastic standard errors (this is the default). Interpret the number.

7. Now recalculate using robust” standard errors. Do so using the “sandwich” package and the “HC0” option. Has your coefficient changed? Your standard error? Briefly explain.

8.  Suppose that we measured the father’s occupational income with error.   Set  the random variable seed using the command set.seed(6362) and add a variable of random noise to the father’s log occupational score, drawn from a normal distribution with mean zero and standard deviation 0.25.  Re-run the regression.  What happened to the coefficient?  Why is this the case?

9. What would happen if instead the son’s income (but not the father’s) was the one measured with noise?  (You can do this calculation, or you can just explain using results discussed in class.)

10. A huge problem with data from this period is the large number of farmers in the sample, who all have the same occupational score”. Re-do the regression with the data excluding farmers (if either the father or son was a farmer, which will have an occ1950 value of 100).

11. With the 1940 data, we can see more directly some possible issues with the occupational score. Calculate the average income (this is the “incwage” variable) for “laborers (nec)” for white and black Floridians. Exclude everyone with an incwage of 999999 or 999998 (this is missing data).