Which College Should I Choose? (R Script)
Like many of you, I like to learn based on trial and error, so I decided to try to run my first R script and from “Michael L. Thompson’s script” and adapt it to this new experiment.
This script will tell you which college is best for you based on your ethnicity, age, region and SAT score. Although this is a generic example, it can be easily replicated using 3Blades’s Jupyter Notebook (R) version. Simply select this option when launching a new workspace from your project.
Who Are You?
Let’s pretend you are a foreign citizen that came here from Latin America on a H1-B and you are looking for a B.S. in Engineering. You are about to turn 30 and got married not that long ago and a kid is on his way. You are still earning under 75k but you are certain that if you get this career change you will jump into the 100K club, so what are your best choices to achieve that in the west coast?
studentProfile = list(
dependent = TRUE,
ethnicity = 'hispanic',
gender = 'male',
age = 'gt24',
income = 'gt30Kle110K',
earnings = 'gt48Kle75K',
sat = 'gt1400',
fasfa = 'fsend_5',
region = 'FarWest',
locale = 'CityLarge',
traits = list(
Risk = 'M',
Vision = 'M',
Breadth = 'M',
Challenge = 'M')
Setup the Data & Model
This code loads the college database and defines necessary data structures and functions to implement the model.
## Loading college database ...Done.
Now, here are the top colleges so you can make a wise decision
# ENTER N, for top-N colleges:
ntop <- 10
studentProfile$beta <- getParameters(studentProfile,propertyMap)
caseResult <- studentCaseStudy(studentBF,studentProfile,propertyMap,verbose=FALSE,ntop=ntop)
# This code will display the results
gplt <- plotTopN(caseResult,plot.it = TRUE)
Now let’s tweak a bit and see what are your best options based on your SAT scores
Full credit goes to Michael for this amazing job, I just tweaked a bit to use it as a brief example of the great things you can do with R.
Would you like a demo for 3Blades? Enroll for one by clicking on the button below!