-
Notifications
You must be signed in to change notification settings - Fork 0
/
FigureA1AgilePredators20191115.do
59 lines (49 loc) · 2.26 KB
/
FigureA1AgilePredators20191115.do
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
**Figure A1: Tuition and debt by ownership over time
clear all
insheet using "https://raw.githubusercontent.com/charlieeatonphd/agilepredators/master/agilepredatorsdata20191116.csv", comma clear
label define iclevel 1 "Four or more years" 2 "At least 2 but less than 4 years"
label define owner_pe 1 "Private equity" 2 "Publicly traded" 3 "Privately held" 4 "Non-profit" 5 "State" 6 "Community"
rename iclevel iclevel_s
encode iclevel_s, gen(iclevel) label(iclevel)
rename state_n state_s
encode state_s, gen(state_n)
rename owner_pe owner_pe_s
encode owner_pe_s, gen(owner_pe) label(owner_pe)
gen tuitionall_thousands = tuitionall_c_w / 1000
gen loan_amt_thousands = loan_amount_borrower_c_w / 1000
collapse (mean) tuitionall_thousands loan_amt_thousands grad_rate_150_p_w grad_rate_150_p2yr_w grad_rate_150_p4yr_w , ///
by(owner_pe year)
reshape wide tuitionall_thousands loan_amt_thousands grad_rate_150_p_w grad_rate_150_p2yr_w grad_rate_150_p4yr_w, i(year) j(owner_pe)
foreach var in tuitionall_thousands loan_amt_thousands grad_rate_150_p_w grad_rate_150_p2yr_w grad_rate_150_p4yr_w {
label var `var'1 "Private equity"
label var `var'2 "Publicly traded"
label var `var'3 "Privately Held"
label var `var'4 "Non-profit"
label var `var'5 "State"
label var `var'6 "Community"
}
*
tw (connect tuitionall_thousands* year, sort msym(O O O D D) ///
mc(black black black gs8 gs8) ///
mfc(black gs12 white gs12 white) ///
lp(l l l l l) lc(black black black gs8 gs8) ///
lw(medthick medthick medthin thin thin)) ///
if year>=1989 & year<2016, ///
legend(size(small) pos(3) ///
subtitle("{bf:Ownership}", size(small))) ///
ytitle(Average tuition in thousands(2015$)) ///
xsize(6.5) ysize(5) ///
name(tuition_time, replace)
tw (connect loan_amt_thousands* year, sort msym(O O O D D) ///
mc(black black black gs8 gs8) ///
mfc(black gs12 white gs12 white) ///
lp(l l l l l) lc(black black black gs8 gs8) ///
lw(medthick medthick medthin thin thin)) ///
if year>=1999 & year<2016, ///
legend(size(small) pos(3) ///
subtitle("{bf:Ownership}", size(small))) ///
ytitle(Average loan in thousands(2015$)) ///
xsize(6.5) ysize(5) ///
name(loan_over_time, replace)
graph combine tuition_time loan_over_time, rows(2) scheme(plotplain) xsize(8.5) ysize(11)
graph export tuition_loan_time.png, replace