Skip to content

Commit

Permalink
Update Colleges_cleaning.R
Browse files Browse the repository at this point in the history
Code for Confidence Intervals + Regressions
  • Loading branch information
eliserust committed Dec 7, 2021
1 parent d714cac commit 0847a9e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions colleges/Colleges_cleaning.R
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,15 @@ colleges_full <- colleges_full %>%
colleges_full = colleges_full[!duplicated(colleges_full$ipeds_id), ]

write.csv(colleges_full, "~/Desktop/colleges_cleaned.csv")


################
## Regressions too
regression1 <- lm(case_rate ~ state+rank2020+enroll2020+ALWAYS+NEVER+winner, data = colleges_full)
stats_schools <- summary(regression1)
print(stats_schools)

regression <- lm(case_rate ~ facility_type+state+latest_inmate_population+political_party+county_population, data = facilities)
stats_prisons <- summary(regression)
print(stats_prisons)

0 comments on commit 0847a9e

Please sign in to comment.