Read the data SCFP2016.csv . The data contains information from the Survey of Consumer Finance in the US. More details in here : https://www.federalreserve.govieconresiscf 2016.htm.The codebook for the survey can be found here. https://sda.berkeley.eduklata/scfcomb2013/Doc/hcbk.htm. Compute the Gini coefficient for both variables INCOME and ASSET . Use the following formula ELI E;=, lyi G=where y is the variable of interest.2n E7_,Compute for both “income” and ‘Wealth” the Lorenz curve. Consider a variable yi sorted in increasing order. Then, the Lorenz curve is a function connecting the point (Fi, Li) from i = 0, .. , n. To compute the points do the following:a. Start with F0 = 0 and L0 = 0 b. Compute ‘Si = Eim c. Compute Fi = d. Compute L1 = 11. Create a function Lorenz(y) that takes a vector y and return (Fib Li). Plot the Lorenz curve for the variables income and wealth.
- Assignment status: Already Solved By Our Experts
- (USA, AUS, UK & CA PhD. Writers)
- CLICK HERE TO GET A PROFESSIONAL WRITER TO WORK ON THIS PAPER AND OTHER SIMILAR PAPERS, GET A NON PLAGIARIZED PAPER FROM OUR EXPERTS