Question: please send me the R code Let Xi=1 if worker i is a union member and Xi=0 if not. Let Yi be their wages. In
Let Xi=1 if worker i is a union member and Xi=0 if not. Let Yi be their wages. In this problem, you'll use the nlswork dataset to plot the conditional distribution of the data, by union status. Youar easiest path will be to do this problem using R, and adjusting the code from the lecture notes. To use R, you'll need to downlose and install it (if you do. I recommend also installing RStudio for a nicer interface), or you can sign up for a free account at wwr, ratudio, cloud. Note: There are sonne observations for which the union variable is missing. You may wish to drop these. a) Plot the function FyiXi=x(y) for cach of x=0 and x=1. Same graph is fine, or two separate graphs. b) Use the geon_denaxy() (or an equivalent if using different statistical software) command to plot fYX=x(y) for both values of x. c) Report the values of B[YiXi=1] and B[YiX=0]. Please submit a copy of your code along with your answers (its OK if you have identical code to those that you worked with)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
