"","broad","narrow","fpm","pop","pop_cat" "1",1,0, XXXXXXXXXX, XXXXXXXXXX,2 "2",0,0, XXXXXXXXXX,16450,3 "3",1,0, XXXXXXXXXX,10710,2 "4",1,1, XXXXXXXXXX,14218,3 "5",1,1, XXXXXXXXXX,20587,4 "6",1,1,...

1 answer below »
5 question R programming assignment.


"","broad","narrow","fpm","pop","pop_cat" "1",1,0,20.4260540008545,10507.6669921875,2 "2",0,0,30.8087425231934,16450,3 "3",1,0,22.192834854126,10710,2 "4",1,1,30.2908420562744,14218,3 "5",1,1,42.7348594665527,20587,4 "6",1,1,39.3841323852539,17925,4 "7",1,1,32.3646011352539,21732.666015625,4 "8",0,0,35.4773864746094,21636.333984375,4 "9",1,1,26.1819953918457,10848,2 "10",1,1,38.7376136779785,18592.666015625,4 "11",0,0,47.360466003418,33209,6 "12",0,0,29.6002941131592,14568.6669921875,3 "13",1,0,35.4533843994141,14794.6669921875,3 "14",1,0,24.6722316741943,19829.333984375,4 "15",1,0,31.8460998535156,16447.333984375,3 "16",1,1,63.7800712585449,48115,8 "17",1,1,31.4268550872803,13622.6669921875,3 "18",1,0,34.8077278137207,14056.6669921875,3 "19",1,0,28.3783874511719,11514.3330078125,2 "20",1,0,21.1647453308105,8637,1 "21",1,1,22.2679271697998,7487,1 "22",1,1,35.2775802612305,28751.333984375,5 "23",1,1,44.6460494995117,27433.333984375,5 "24",0,0,29.6002941131592,15938.6669921875,3 "25",1,1,25.8192195892334,11133.6669921875,2 "26",1,1,27.4414367675781,11549.3330078125,2 "27",0,0,26.5963153839111,19401.666015625,4 "28",0,0,18.3149452209473,9412.6669921875,1 "29",0,0,22.5590705871582,9690,1 "30",1,0,45.8681182861328,38111,7 "31",1,1,36.1137466430664,16414.666015625,3 "32",1,1,25.501127243042,14402,3 "33",1,1,30.6003856658936,12926.3330078125,2 "34",0,0,28.1464157104492,15616.3330078125,3 "35",0,0,29.793119430542,14733.6669921875,3 "36",1,0,37.6190757751465,18347.333984375,4 "37",0,0,28.9503059387207,13487.3330078125,2 "38",1,0,40.6315498352051,26506,5 "39",1,0,41.9472312927246,27300.333984375,5 "40",1,0,30.7437076568604,15904,3 "41",1,1,17.9663963317871,11226,2 "42",1,0,15.6236009597778,8220.3330078125,1 "43",0,0,59.8608207702637,43966.66796875,7 "44",0,0,28.3917427062988,14492.6669921875,3 "45",0,0,30.9719543457031,13934.3330078125,3 "46",1,0,27.2336101531982,15183.3330078125,3 "47",1,1,19.3688106536865,7104.33349609375,1 "48",1,1,23.2637634277344,7200,1 "49",1,0,25.8250770568848,13984.3330078125,3 "50",0,0,24.4905166625977,9985.3330078125,1 "51",1,1,21.3719959259033,9543.3330078125,1 "52",1,1,31.1284999847412,14296.6669921875,3 "53",1,0,23.5894908905029,7316,1 "54",1,1,20.3531875610352,8129.66650390625,1 "55",1,0,41.7722091674805,23425.333984375,4 "56",1,1,52.637825012207,26372,5 "57",0,0,24.9273052215576,13280.3330078125,2 "58",1,0,33.6365432739258,13971.3330078125,3 "59",1,1,23.3250179290771,11934.6669921875,2 "60",0,0,23.3250179290771,11934.6669921875,2 "61",1,1,28.1474990844727,12300.6669921875,2 "62",1,1,26.9502029418945,12289.6669921875,2 "63",0,0,41.4404106140137,26185,5 "64",1,0,32.6859283447266,16427.666015625,3 "65",1,1,38.7128868103027,17326,4 "66",0,0,35.9327850341797,15288.6669921875,3 "67",1,1,26.9779243469238,12071,2 "68",1,1,43.3987693786621,27419.666015625,5 "69",1,1,44.7334594726562,18990.666015625,4 "70",1,1,62.0635795593262,34874.33203125,6 "71",1,0,22.0025196075439,8760,1 "72",1,1,33.7606086730957,12401.6669921875,2 "73",1,1,67.2730865478516,49506,8 "74",1,0,38.2680435180664,21128.666015625,4 "75",1,1,48.2440299987793,31003.333984375,6 "76",0,0,62.0335083007812,33467.33203125,6 "77",1,1,18.3149452209473,7086.66650390625,1 "78",1,0,18.997371673584,9607.3330078125,1 "79",1,0,29.2790050506592,13148.3330078125,2 "80",1,1,28.2343273162842,11135,2 "81",1,1,22.9502906799316,7463,1 "82",0,0,30.52490234375,14835.3330078125,3 "83",1,0,37.598445892334,16376.3330078125,3 "84",0,0,35.1485824584961,14227.6669921875,3 "85",1,0,35.5203514099121,17629,4 "86",1,0,42.544059753418,18874.333984375,4 "87",1,1,29.8863525390625,10819.3330078125,2 "88",1,1,30.7573623657227,13450.6669921875,2 "89",1,1,37.2778854370117,14726.6669921875,3 "90",1,1,20.4286556243896,9886.6669921875,1 "91",1,0,26.490873336792,10214.3330078125,2 "92",1,1,30.7573623657227,15144,3 "93",1,1,44.7059440612793,17809.666015625,4 "94",0,0,50.1128883361816,37000.33203125,6 "95",1,1,23.8977718353271,11239,2 "96",0,0,28.5384616851807,11618,2 "97",0,0,19.5678329467773,9176,1 "98",1,0,28.3627109527588,10680.6669921875,2 "99",1,0,41.378849029541,22870.666015625,4 "100",1,1,34.9237937927246,18023.666015625,4 "101",0,0,20.4462757110596,7081.66650390625,1 "102",1,1,31.0167579650879,11298,2 "103",1,0,37.5867385864258,22249.333984375,4 "104",1,1,40.8174018859863,22857,4 "105",1,0,21.4150905609131,11741.6669921875,2 "106",1,1,21.4150905609131,11741.6669921875,2 "107",1,1,22.3017044067383,11957.6669921875,2 "108",1,1,22.3017044067383,11957.6669921875,2 "109",1,1,31.8460998535156,16139.3330078125,3 "110",1,0,20.7385635375977,8356.6669921875,1 "111",1,0,21.6748142242432,8425.3330078125,1 "112",0,0,15.6850671768188,10039.3330078125,1 "113",0,0,24.1017055511475,7995.66650390625,1 "114",1,1,15.8217554092407,7952.66650390625,1 "115",0,0,37.4994735717773,16593.666015625,3 "116",1,1,46.5275192260742,17787.666015625,4 "117",1,0,17.3779945373535,8656,1 "118",1,1,17.1325912475586,9885.3330078125,1 "119",1,1,25.5290699005127,12516.3330078125,2 "120",0,0,36.0837364196777,25620.333984375,5 "121",0,0,45.2655334472656,30042.333984375,5 "122",0,0,26.6051769256592,8997.6669921875,1 "123",1,1,21.9491558074951,8185.66650390625,1 "124",1,1,22.5417251586914,10581.6669921875,2 "125",1,1,32.3646011352539,19493.333984375,4 "126",1,1,35.4773864746094,17138,4 "127",1,0,17.9162616729736,8937.3330078125,1 "128",1,0,18.5510921478271,9014,1 "129",1,1,20.4634552001953,8737,1 "130",1,0,26.9237976074219,13552.6669921875,2 "131",1,1,52.5351638793945,30161,5 "132",1,0,31.0978469848633,20282.666015625,4 "133",1,1,16.9086380004883,11659.6669921875,2 "134",1,1,36.6298828125,18873.666015625,4 "135",1,1,45.1181335449219,17713.666015625,4 "136",1,0,40.7731742858887,24523.666015625,5 "137",1,1,49.9423065185547,27219.666015625,5 "138",1,0,24.0069942474365,9695,1 "139",1,0,21.2720317840576,9955.3330078125,1 "140",1,0,34.7559852600098,20336,4 "141",0,0,47.0235252380371,40685,7 "142",0,0,45.8458213806152,36276,6 "143",1,0,53.3757209777832,37768.66796875,7 "144",1,0,35.5203514099121,19414,4 "145",1,0,20.7003059387207,10020.3330078125,1 "146",1,1,32.8364486694336,15788.6669921875,3 "147",1,1,32.8364486694336,15788.6669921875,3 "148",1,0,32.8364486694336,15788.6669921875,3 "149",1,0,39.0865669250488,15112,3 "150",1,1,39.0865669250488,15112,3 "151",1,1,24.5352249145508,14409,3 "152",1,1,24.5352249145508,14409,3 "153",1,1,23.8977718353271,11094,2 "154",1,1,23.8977718353271,12035,2 "155",1,0,17.2074947357178,9964.3330078125,1 "156",1,1,24.2644824981689,10956.3330078125,2 "157",1,0,26.0589542388916,8155,1 "158",1,0,17.9162616729736,9036.6669921875,1 "159",1,0,48.7419090270996,36471,6 "160",0,0,26.0393333435059,16206,3 "161",1,0,36.254222869873,17278.333984375,4 "162",1,0,45.0139541625977,37081,6 "163",1,0,57.0341606140137,39939.33203125,7 "164",0,0,26.0393333435059,15503,3 "165",1,0,24.0909671783447,7513,1 "166",1,1,22.9983596801758,7577.33349609375,1 "167",1,1,34.7559852600098,17353.333984375,4 "168",1,0,40.3638534545898,18272.333984375,4 "169",1,0,20.4286556243896,8469.6669921875,1 "170",1,0,21.3754253387451,8816.6669921875,1 "171",1,1,22.2735157012939,11013.6669921875,2 "172",1,1,35.4730033874512,25101.666015625,5 "173",1,0,32.3646011352539,21580.666015625,4 "174",1,1,35.4773864746094,23352.333984375,4 "175",1,0,23.3022842407227,11026,2 "176",0,0,36.4550628662109,26551.666015625,5 "177",0,0,36.4550628662109,26551.666015625,5 "178",0,0,22.7219352722168,9564.3330078125,1 "179",1,1,22.6851482391357,8354.6669921875,1 "180",1,1,20.7902431488037,10635,2 "181",0,0,21.1572647094727,7886,1 "182",1,0,15.6430416107178,7146,1 "183",1,0,16.4946460723877,7200.66650390625,1 "184",1,1,17.3779945373535,9280,1 "185",1,1,20.1819286346436,9473.3330078125,1 "186",1,1,27.2277278900146,13872,3 "187",1,1,33.2711181640625,14588,3 "188",1,0,38.7226943969727,19387.666015625,4 "189",1,1,43.550910949707,19542.666015625,4 "190",0,0,40.4181671142578,29962.666015625,5 "191",1,1,49.1899261474609,35504.33203125,6 "192",1,0,28.1509857177734,12168,2 "193",1,1,29.785135269165,13164.6669921875,2 "194",0,0,23.1706581115723,10544.6669921875,2 "195",1,1,26.909236907959,11197.6669921875,2 "196",1,0,22.5590705871582,7487,1 "197",0,0,16.0902729034424,13173.6669921875,2 "198",1,0,16.0902729034424,13173.6669921875,2 "199",1,1,20.8595790863037,15979,3 "200",1,0,40.8573036193848,20980,4 "201",1,0,42.750846862793,21566.333984375,4 "202",0,0,25.5120315551758,12806,2 "203",1,0,41.7035636901855,25786,5 "204",1,0,46.2756614685059,26703.666015625,5 "205",1,0,19.1468048095703,18109,4 "206",1,1,21.7868900299072,10488.6669921875,2 "207",1,0,23.6802349090576,12661.6669921875,2 "208",1,0,42.4628410339355,26692.333984375,5 "209",1,1,45.0875434875488,29880,5 "210",1,1,59.6346588134766,33219.33203125,6 "211",1,1,42.3294868469238,18029,4 "212",1,0,46.5963745117188,25654,5 "213",1,0,23.6756381988525,10185.3330078125,1 "214",0,0,29.8863525390625,11314,2 "215",1,1,29.8863525390625,12024,2 "216",1,0,29.7821159362793,12339,2 "217",1,1,38.2936058044434,20072.666015625,4 "218",1,1,20.8234062194824,10602.6669921875,2 "219",1,1,26.6168956756592,12774,2 "220",0,0,37.6190757751465,18227.666015625,4 "221",1,1,41.5078353881836,18041.666015625,4 "222",0,0,35.5203514099121,20625,4 "223",1,1,51.9603652954102,37708.33203125,7 "224",1,0,34.1223564147949,21711.666015625,4 "225",0,0,48.0141448974609,20861.333984375,4 "226",0,0,48.4947090148926,33345,6 "227",1,1,38.2680435180664,18181.666015625,4 "228",1,1,44.7334594726562,19383.333984375,4 "229",1,0,44.6460494995117,26408,5 "230",0,0,52.1890335083008,28497.666015625,5 "231",1,1,47.7955360412598,36291,6 "232",1,0,17.3779945373535,7387.33349609375,1 "233",1,0,20.1819286346436,7696.33349609375,1 "234",1,0,22.0339469909668,16090,3 "235",1,0,28.0459327697754,13923.6669921875,3 "236",1,0,36.9957389831543,20237,4 "237",1,0,17.7601795196533,7449,1 "238",1,0,49.269905090332,32791.33203125,6 "239",1,0,53.2805252075195,38793.33203125,7 "240",1,1,63.816089630127,41539.33203125,7 "241",0,0,22.2735157012939,11414,2 "242",1,0,23.1706581115723,10586.6669921875,2 "243",1,1,24.4199256896973,11604.3330078125,2 "244",1,0,31.6749668121338,18486.333984375,4 "245",1,1,40.818775177002,27438,5 "246",1,1,49.2581214904785,29131.666015625,5 "247",1,1,31.6749668121338,19875.666015625,4 "248",1,1,28.3627109527588,13179.6669921875,2 "249",1,1,32.7877464294434,16809,3 "250",0,0,35.8525238037109,25032.333984375,5 "251",1,1,31.9005355834961,13904.6669921875,3 "252",1,0,26.0589542388916,8950.3330078125,1 "253",1,1,28.2986106872559,18227.666015625,4 "254",0,0,40.4688911437988,28150.333984375,5 "255",1,0,50.8091659545898,28524,5 "256",1,1,34.7559852600098,21046.666015625,4 "257",0,0,25.6025581359863,11369.6669921875,2 "258",1,0,21.846960067749,9130.6669921875,1 "259",1,0,29.4688949584961,9890,1 "260",1,1,29.4898223876953,10801.3330078125,2 "261",1
Answered Same DayApr 22, 2021

Answer To: "","broad","narrow","fpm","pop","pop_cat" "1",1,0, XXXXXXXXXX, XXXXXXXXXX,2 "2",0,0,...

Mohd answered on Apr 23 2021
125 Votes
Corruption
-
4/22/2021
loading packages and Data
library(readr)
library(magrittr)
library(dplyr)
library(ggplot2)
library(tidyverse)
library(broom)
corruption <- read_csv("corruption.csv")
Question 1 The authors use a Regression Discontinuity (RD) design. What do the authors use as the forcing variable and outcome variable? Discuss why the authors can’t simply compare all “treated” and “non-treated” villages. Then, discuss how the RD design addresses this problem. What is one weakness of the RD design?
A. We can develop a
modeling strategy that is designed, first, to guard against biased estimates and, second, to assure maximum efficiency of estimates. The best option would obviously be to specify the true model exactly. The treatment effect estimate for this model is likely to be unbiased although it will be inefficient. Then, in successive analyses, gradually remove higher-order terms until the treatment effect estimate appears to differ from the initial one or until the model diagnostics (e.g., residual plots) indicate that the model fits poorly.
Question 2 Read in the data below for all villages in the authors’ dataset. Then, create three regressions. Regress the broad measure of corruption on: 1. the measure of federal transfers 2. the measure of federal transfers and population. 3. the measure of federal transfers, population, and the population category (as a factor). Then, repeat this analysis for the narrow measure of corruption (so you will have six regressions in total). Interpret each of your three regressions. Can the coefficient be interpreted causally in these models? Explain why or why not.
#install.packages("stargazer")
library(stargazer)
#str(corruption)
mod1<-lm(broad~fpm,data=corruption)
mod2<-lm(broad~fpm+pop,data=corruption)
mod3<-lm(broad~fpm+pop+as.factor(pop_cat),data=corruption)
stargazer(mod1,mod2,mod3,type="text",title="Broad")
##
## Broad
## =========================================================================================
## Dependent variable:
## ---------------------------------------------------------------------
## broad
## (1) (2) (3)
## -----------------------------------------------------------------------------------------
## fpm 0.0005 0.010*** 0.010***
## (0.001) (0.002) (0.002)
##
## pop -0.00001*** -0.00003***
## (0.00000) (0.00001)
##
## as.factor(pop_cat)2 0.064
## (0.046)
##
## as.factor(pop_cat)3 0.088
## (0.069)
##
## as.factor(pop_cat)4 0.227**
## (0.102)
##
## as.factor(pop_cat)5 0.329**
## (0.161)
##
## as.factor(pop_cat)6 0.475**
## (0.214)
##
## as.factor(pop_cat)7 0.656**
## (0.269)
##
## as.factor(pop_cat)8 0.775**
## (0.332)
##
## Constant 0.769*** 0.692*** 0.864***
## (0.034) (0.038) (0.082)
##
## -----------------------------------------------------------------------------------------
##...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here