Skip to content

Instantly share code, notes, and snippets.

@hyphaltip
Last active February 9, 2020 01:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hyphaltip/15632e328eb410536c2e74cbe563f26e to your computer and use it in GitHub Desktop.
Save hyphaltip/15632e328eb410536c2e74cbe563f26e to your computer and use it in GitHub Desktop.
Salary MF skew
library(ggplot2)
survey <- read.csv("data-cJLyN.csv",header=T)
survey = survey[-212,] # remove the aggregate number
pdf("summary_plots.pdf")
p <- ggplot(survey,aes(x=survey$Men.s.salary,y=survey$Women.s.salary)) + geom_point() +
geom_smooth(method = "glm", , se = F,
method.args = list(family = "poisson"))
p
p <- ggplot(survey,aes(x=survey$Number..total,y=survey$Salary..all)) + geom_point() +
geom_smooth(method = "glm", , se = F,
method.args = list(family = "poisson"))
p
p <- ggplot(survey,aes(x=survey$Number.of.women,y=survey$Women.s.salary)) + geom_point() +
geom_smooth(method = "glm", , se = F,
method.args = list(family = "poisson"))
p
cor(survey$Number.of.women,survey$Women.s.salary)
p <- ggplot(survey,aes(x=survey$Number.of.women,y=survey$Women.s.salaries.as.a.percentage.of.men.s)) + geom_point() +
geom_smooth(method = "glm", , se = F,
method.args = list(family = "poisson"))
p
p <- ggplot(survey,aes(x=survey$Number..total,y=survey$Women.s.salaries.as.a.percentage.of.men.s)) + geom_point() +
geom_smooth(method = "glm", , se = F,
method.args = list(family = "poisson"))
p
Rank Institution Number, total Salary, all Number of men Men's salary Number of women Women's salary Percent female Women's salaries as a percentage of men's
1 U. of Louisiana at Monroe 57 85989 35 83097 22 90590 38.596 109.017
2 Morgan State U. 73 114208 56 112741 17 119041 23.288 105.588
3 Texas Woman's U. 127 101861 37 99881 90 102675 70.866 102.797
4 U. of Texas at Tyler 57 99043 42 98548 15 100432 26.316 101.912
5 Montana State U. at Bozeman 192 101208 149 100870 43 102382 22.396 101.499
6 U. of Alabama at Huntsville 64 127476 53 127340 11 128131 17.188 100.621
7 North Carolina A&T State U. 104 101845 80 101835 24 101879 23.077 100.043
8 Montclair State U. 190 117413 103 117391 87 117438 45.789 100.04
9 U. of Texas-Rio Grande Valley 214 78073 158 78089 56 78030 26.168 99.924
10 South Dakota State U. 122 94895 85 95088 37 94453 30.328 99.332
11 California State U. at Fresno 228 107073 151 107447 77 106339 33.772 98.969
12 Colorado School of Mines 95 148322 78 148606 17 147021 17.895 98.933
13 U. of Oregon 310 133136 217 133622 93 132003 30 98.788
14 Indiana U. of Pennsylvania 191 111685 118 112209 73 110838 38.22 98.778
15 Texas State U. 261 104555 164 105056 97 103708 37.165 98.717
16 Stephen F. Austin State U. 107 87595 75 87964 32 86731 29.907 98.598
17 Delaware State U. 48 90761 34 91187 14 89725 29.167 98.397
18 U. of South Dakota 75 101207 53 101709 22 99999 29.333 98.319
19 U. of Arkansas at Little Rock 136 89173 97 89713 39 87829 28.676 97.9
20 State U. of New York College of Environmental Science and Forestry 48 97393 41 97697 7 95611 14.583 97.865
21 Ferris State U. 157 104374 98 105254 59 102912 37.58 97.775
22 U. of New Orleans 85 90601 66 91073 19 88962 22.353 97.682
23 U. of Massachusetts at Lowell 149 147542 106 148606 43 144919 28.859 97.519
24 Eastern Michigan U. 339 104948 182 106219 157 103475 46.313 97.417
25 Cleveland State U. 121 111160 80 112150 41 109226 33.884 97.393
26 East Carolina U. 249 103442 177 104288 72 101363 28.916 97.195
27 Georgia Institute of Technology 415 150740 344 151480 71 147157 17.108 97.146
28 U. of Nevada at Las Vegas 294 131258 221 132203 73 128399 24.83 97.123
29 U. of Toledo 194 105429 135 106408 59 103187 30.412 96.973
30 Florida A&M U. 163 100031 111 101025 52 97907 31.902 96.914
31 U. of Hawaii at Hilo 69 104108 36 105747 33 102319 47.826 96.758
32 U. of Nebraska at Lincoln 439 128298 344 129233 95 124912 21.64 96.656
33 U. of California at Riverside 347 165216 263 166619 84 160823 24.207 96.521
34 U. of Michigan at Flint 48 117128 32 118513 16 114360 33.333 96.496
35 U. of North Carolina at Wilmington 179 99693 124 100792 55 97214 30.726 96.45
36 Lamar U. 93 98675 62 99864 31 96299 33.333 96.43
37 U. of Massachusetts at Boston 117 138406 74 140273 43 135194 36.752 96.379
38 U. at Albany 168 118123 122 119327 46 114927 27.381 96.313
39 Florida International U. 267 136390 202 137675 65 132398 24.345 96.167
40 Michigan State U. 798 153793 593 155327 205 149356 25.689 96.156
41 U. of Montana at Missoula 228 83070 149 84217 79 80907 34.649 96.07
42 U. of Colorado at Boulder 510 143485 376 145043 134 139112 26.275 95.911
43 North Carolina State U. 651 128640 494 129957 157 124498 24.117 95.799
44 Clemson U. 337 134088 265 135334 72 129505 21.365 95.693
45 U. of Tennessee at Chattanooga 135 102068 83 103892 52 99157 38.519 95.442
46 Georgia Southern U. 203 74734 128 76019 75 72540 36.946 95.424
47 Jackson State U. 87 82935 59 84249 28 80166 32.184 95.154
48 Purdue U. at West Lafayette 790 143781 627 145235 163 138187 20.633 95.147
49 U. of New Mexico 249 108955 155 111066 94 105473 37.751 94.964
50 Missouri State U. 232 83009 154 84459 78 80146 33.621 94.893
51 Bowling Green State U., Main Campus 179 112755 115 114852 64 108986 35.754 94.893
52 Oregon State U. 359 127422 265 129163 94 122516 26.184 94.854
53 U. of Vermont 171 122419 115 124705 56 117724 32.749 94.402
54 Boise State U. 168 93472 107 95423 61 90049 36.31 94.368
55 U. of Georgia 755 127626 547 129659 208 122281 27.55 94.31
56 Portland State U. 208 116871 142 119053 66 112177 31.731 94.224
57 Northern Illinois U. 209 96944 142 98878 67 92846 32.057 93.9
58 U. of Illinois at Chicago 363 146037 235 149264 128 140111 35.262 93.868
59 U. of Rhode Island 280 110567 178 113096 102 106152 36.429 93.86
60 Rutgers U. at New Brunswick 833 149892 589 152642 244 143254 29.292 93.85
61 North Dakota State U. 129 111453 99 113077 30 106093 23.256 93.824
62 Southern Illinois U. at Carbondale 168 93040 130 94379 38 88462 22.619 93.731
63 San Diego State U. 324 118701 205 121583 119 113737 36.728 93.547
64 Marshall U. 187 82798 117 84849 70 79370 37.433 93.543
65 U. of Massachusetts at Amherst 459 152053 325 154976 134 144964 29.194 93.54
66 Towson U. 224 85365 120 88018 104 82305 46.429 93.509
67 Valdosta State U. 124 74396 78 76234 46 71280 37.097 93.502
68 New Jersey Institute of Technology 136 165248 119 166606 17 155742 12.5 93.479
69 U. of North Carolina at Greensboro 198 114439 117 117685 81 109751 40.909 93.258
70 U. of California at Berkeley 871 199618 628 203451 243 189710 27.899 93.246
71 U. of Wyoming 189 122134 140 124321 49 115885 25.926 93.214
72 Washburn U. 73 99390 37 102928 36 95754 49.315 93.03
73 Middle Tennessee State U. 315 97026 193 99723 122 92761 38.73 93.019
74 U. of California at Santa Cruz 295 168432 195 172563 100 160375 33.898 92.937
75 U. of Texas at El Paso 165 117798 127 119773 38 111196 23.03 92.839
76 U. of Maryland at College Park 724 157249 546 160097 178 148512 24.586 92.764
77 U. of North Dakota 144 103204 100 105594 44 97773 30.556 92.593
78 Rowan U. 115 118368 69 122010 46 112905 40 92.537
79 U. of South Carolina at Columbia 393 135905 286 138740 107 128328 27.226 92.495
80 City College of City U. of New York 240 133411 176 136151 64 125874 26.667 92.452
81 U. of Massachusetts at Dartmouth 121 125789 73 129697 48 119845 39.669 92.404
82 Metropolitan State U. 40 99385 13 104759 27 96798 67.5 92.401
83 U. of Texas at Austin 992 168499 728 172008 264 158823 26.613 92.335
84 U. of Nebraska at Omaha 128 95057 89 97335 39 89857 30.469 92.317
85 U. of Michigan at Ann Arbor 1184 174125 838 178127 346 164430 29.223 92.311
86 U. of Northern Colorado 198 87887 117 90742 81 83764 40.909 92.31
87 U. of California at Irvine 621 181122 436 185370 185 171110 29.791 92.307
88 U. of Idaho 182 106272 133 108529 49 100146 26.923 92.276
89 U. of Texas at Arlington 218 128369 176 130310 42 120236 19.266 92.269
90 U. of Maine at Orono 178 112053 131 114390 47 105541 26.404 92.264
91 U. of Utah 461 137152 332 140243 129 129199 27.983 92.125
92 U. of South Alabama 100 86701 71 88733 29 81726 29 92.103
93 Northern Kentucky U. 119 99261 75 102276 44 94122 36.975 92.027
94 Texas A&M U. at College Station 1064 147703 855 150068 209 138029 19.643 91.978
95 U. of Kentucky 460 124408 344 127014 116 116682 25.217 91.865
96 Wayne State U. 267 131562 200 134312 67 123351 25.094 91.839
97 Miami U. (Ohio) 233 127764 144 131898 89 121074 38.197 91.794
98 U. of California at Davis 860 164946 583 169430 277 155509 32.209 91.784
99 U. of Colorado at Denver 178 132131 108 136583 70 125263 39.326 91.712
100 U. of Florida 847 147350 638 150431 209 137946 24.675 91.701
101 U. of Arizona 643 134893 454 138272 189 126775 29.393 91.685
102 West Virginia U. 341 123102 245 126067 96 115534 28.152 91.645
103 Ohio U. 237 109632 168 112389 69 102920 29.114 91.575
104 U. of West Georgia 118 79193 79 81461 39 74596 33.051 91.573
105 East Tennessee State U. 154 84460 104 86908 50 79367 32.468 91.323
106 Western Kentucky U. 188 83094 123 85675 65 78211 34.574 91.288
107 Rutgers U. at Newark 196 164011 134 168661 62 153961 31.633 91.284
108 Iowa State U. 513 130390 402 132915 111 121244 21.637 91.219
109 U. of Washington 857 149268 554 154075 303 140479 35.356 91.176
110 Indiana State U. 123 90711 83 93439 40 85051 32.52 91.023
111 Stony Brook U. 341 148014 260 151242 81 137655 23.754 91.016
112 U. of California at Los Angeles 1078 216977 741 223271 337 203138 31.262 90.983
113 Mississippi State U. 228 108048 178 110253 50 100196 21.93 90.878
114 Kennesaw State U. 273 82857 166 85933 107 78085 39.194 90.867
115 Oklahoma State U. at Stillwater 311 111968 234 114568 77 104064 24.759 90.832
116 U. of Central Arkansas 97 81005 62 83802 35 76052 36.082 90.752
117 Central Michigan U. 300 109150 191 112964 109 102466 36.333 90.707
118 U. of Alabama at Birmingham 241 136467 155 141185 86 127964 35.685 90.636
119 U. of Delaware 403 155259 287 159578 116 144574 28.784 90.598
120 Southern Illinois U. at Edwardsville 157 88704 98 91961 59 83294 37.58 90.575
121 Michigan Technological U. 122 118279 96 120716 26 109281 21.311 90.527
122 Northern Arizona U. 292 106706 182 110670 110 100146 37.671 90.491
123 Utah State U. 252 108390 187 111136 65 100490 25.794 90.421
124 Texas A&M U. at Kingsville 100 90498 77 92539 23 83664 23 90.409
125 U. of Minnesota-Twin Cities 939 142413 669 146467 270 132369 28.754 90.375
126 Tennessee Technological U. 144 93830 106 96287 38 86976 26.389 90.33
127 Arkansas State U. at Jonesboro 106 86335 65 89698 41 81003 38.679 90.306
128 U. of Illinois at Urbana-Champaign 837 151589 620 155501 217 140411 25.926 90.296
129 U. of Louisville 296 106502 208 109719 88 98899 29.73 90.138
130 Arizona State U. 632 147776 456 151956 176 136946 27.848 90.122
131 Western Michigan U. 359 112097 242 115877 117 104279 32.591 89.991
132 U. of Southern Mississippi 145 89807 100 92697 45 83383 31.034 89.952
133 Kansas State U. 270 109373 203 112206 67 100789 24.815 89.825
134 Tennessee State U. 107 86919 71 90020 36 80802 33.645 89.76
135 U. of California at Santa Barbara 509 187459 351 193662 158 173677 31.041 89.68
136 Auburn U. 407 128323 306 131734 101 117988 24.816 89.565
137 Binghamton U. 186 123307 133 127115 53 113751 28.495 89.487
138 Sam Houston State U. 176 99790 115 103575 61 92654 34.659 89.456
139 U. of Tennessee at Knoxville 514 141465 360 146100 154 130629 29.961 89.411
140 Washington State U. 331 125001 240 128793 91 115001 27.492 89.291
141 Pennsylvania State U. at University Park 936 149472 701 153653 235 136998 25.107 89.161
142 College of William & Mary 255 132264 168 137358 87 122428 34.118 89.131
143 U. of Kansas 430 125474 305 129600 125 115406 29.07 89.048
144 Texas Southern U. 135 93996 84 98109 51 87222 37.778 88.903
145 U. of Connecticut 468 147066 326 152206 142 135265 30.342 88.87
146 Virginia Commonwealth U. 219 127670 155 131997 64 117190 29.224 88.782
147 U. of North Texas 334 120692 239 124681 95 110656 28.443 88.751
148 U. of California at San Diego 741 187109 556 192517 185 170854 24.966 88.747
149 Indiana U.-Purdue U. at Indianapolis 217 109997 150 114051 67 100920 30.876 88.487
150 Missouri U. of Science and Technology 136 127460 112 130124 24 115026 17.647 88.397
151 U. of New Hampshire 189 134060 130 139110 59 122934 31.217 88.372
152 Ohio State U. 924 143306 649 148500 275 131049 29.762 88.248
153 Texas Tech U. 403 126202 304 129977 99 114610 24.566 88.177
154 City U. of New York Graduate Center 161 153791 95 161719 66 142379 40.994 88.041
155 Florida Atlantic U. 222 110903 158 114878 64 101089 28.829 87.997
156 U. of Arkansas at Fayetteville 340 127152 262 130777 78 114977 22.941 87.918
157 New Mexico State U. at Las Cruces 207 96687 143 100451 64 88276 30.918 87.88
158 Colorado State U. at Fort Collins 461 127642 327 132445 134 115921 29.067 87.524
159 U. of Hawaii-Manoa 393 139231 262 145282 131 127127 33.333 87.504
160 Idaho State U. 132 86660 95 89819 37 78549 28.03 87.453
161 Florida State U. 501 137666 372 142269 129 124394 25.749 87.436
162 U. of South Florida 343 131217 253 135707 90 118595 26.239 87.39
163 U. of Mississippi 246 116339 162 121579 84 106233 34.146 87.378
164 Illinois State U. 217 96324 136 101113 81 88283 37.327 87.311
165 U. of North Florida 97 103453 65 107974 32 94269 32.99 87.307
166 Virginia Tech 594 141833 488 145182 106 126415 17.845 87.073
167 U. of Virginia 584 174539 437 180470 147 156911 25.171 86.946
168 U. of Maryland-Baltimore County 153 119332 109 123994 44 107782 28.758 86.925
169 Indiana U. at Bloomington 697 127591 507 132396 190 114770 27.26 86.687
170 U. of Pittsburgh main campus 496 151956 352 158221 144 136642 29.032 86.361
171 Ball State U. 224 94123 149 98662 75 85104 33.482 86.258
172 U. of Iowa 432 127932 307 133282 125 114793 28.935 86.128
173 U. of Central Florida 321 146273 239 151648 82 130609 25.545 86.126
174 U. of Cincinnati 404 125704 272 131707 132 113335 32.673 86.051
175 U. at Buffalo 376 130017 281 134776 95 115940 25.266 86.024
176 Rutgers U. at Camden 108 139618 65 147879 43 127132 39.815 85.97
177 U. of North Carolina at Chapel Hill 570 160643 383 168396 187 144765 32.807 85.967
178 U. of Maryland-Eastern Shore 41 88896 25 94072 16 80808 39.024 85.9
179 U. of Houston 436 154246 345 158923 91 136515 20.872 85.9
180 Old Dominion U. 220 107526 166 111406 54 95598 24.545 85.81
181 U. of Texas at Dallas 263 160346 220 164162 43 140822 16.35 85.782
182 Texas A&M U. at Commerce 70 95273 48 99737 22 85531 31.429 85.757
183 Louisiana State U. at Baton Rouge 438 125360 342 129445 96 110805 21.918 85.6
184 U. of Colorado at Colorado Springs 79 113084 56 118069 23 100946 29.114 85.497
185 U. of Wisconsin at Milwaukee 253 103750 169 109024 84 93141 33.202 85.432
186 Arizona State U.-Skysong 137 134668 96 140953 41 119952 29.927 85.101
187 Oakland U. 129 112748 92 117785 37 100222 28.682 85.089
188 Georgia State U. 281 119620 189 125820 92 106883 32.74 84.949
189 U. of Alabama at Tuscaloosa 311 149265 226 155692 85 132177 27.331 84.896
190 U. of Akron 216 116843 156 121970 60 103512 27.778 84.867
191 U. of Nevada at Reno 173 132312 126 138013 47 117027 27.168 84.794
192 U. of Wisconsin at Madison 1136 132916 749 140260 387 118703 34.067 84.631
193 Temple U. 410 145860 289 152833 121 129207 29.512 84.541
194 U. of California at Merced 70 159981 48 168214 22 142018 31.429 84.427
195 U. of Louisiana at Lafayette 137 105613 106 109541 31 92180 22.628 84.151
196 U. of Missouri at St. Louis 118 101810 75 108120 43 90803 36.441 83.984
197 U. of Alaska at Fairbanks 84 106419 60 111614 24 93431 28.571 83.709
198 U. of North Carolina at Charlotte 233 125993 171 131805 62 109965 26.609 83.43
199 U. of Texas at San Antonio 255 125633 193 131136 62 108505 24.314 82.742
200 U. of Oklahoma at Norman 394 124730 292 130596 102 107936 25.888 82.649
201 Kent State U. at Kent 218 111446 145 118398 73 97636 33.486 82.464
202 Wright State U. 182 112685 123 119893 59 97658 32.418 81.454
203 U. of Memphis 219 117612 161 123743 58 100592 26.484 81.291
204 U. of Missouri at Columbia 374 122333 261 129665 113 105400 30.214 81.286
205 U. of Missouri at Kansas City 160 108440 92 118560 68 94749 42.5 79.916
206 Arizona State U.-Downtown Phoenix 125 128351 66 142329 59 112716 47.2 79.194
207 Louisiana Tech U. 66 90818 43 97925 23 77532 34.848 79.175
208 George Mason U. 361 138420 257 148579 104 113315 28.809 76.266
209 Texas A&M U. at Corpus Christi 149 80245 84 90248 65 67318 43.624 74.592
210 Augusta U. 73 95688 42 108007 31 78997 42.466 73.141
211 Wichita State U. 147 92229 99 101201 48 73723 32.653 72.848
null Over all for 211 institutions 63408 133827 44929 138227 18479 123130 29.143 89.078
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment