Monday, January 26, 2015

The basic logic of Non-linear Modeling: Binary Outcomes

Non-linear regression is very similar in spirit to linear regression and the general linear model. In this situation we are dealing with binary linear outcome, and we are going to have to end up modeling it on a transformative, non-linear scale. So what that means is we will start with something that is measured as a yes or no, one or zero, and then transform it to a probability. And the thing we're going to estimate is a linear function of our predictors, transformed into a non-linear outcome. Might sound a bit confusing, but just hang in there.

Regression with continuous dependent variables

Lets say you're all of a sudden interested in the attendance to baseball games. You want to understand what affects the level of attendance to baseball games, lets call it ATTEND (in thousands of people), and you believe that a current wins in the season have a say in how the level of attendance to the baseball games look. In other words, you believe there is a linear relationship between attendance to a baseball team's games and the wins they have in a season. This is called a linear model, and in that case, we can notate the model like this:


or simply...

Based off this linear relationship, estimating this model is fairly easy. You can observe the relationship between the two using methods of summary statistics, like scatter plots, and based on the apparent upward trend in the plot points, you may infer that there is a positive relationship between the X and Y variables, probably leaving you with the question of how strong and significant the magnitude of this relationship is.

With this particular example, you're bound to receive regression estimates that confirm the positive relationship between the two variables.
 Dependent variable: ATTEND

              coefficient    std. error   t-ratio   p-value
  -----------------------------------------------------------
  const        −1340.92      387.127      −3.464    0.0009    ***
  CURNTWIN      38.6325      4.74786       8.137    6.02e-012 ***
And when you interpret the magnitude of the coefficients, you can conclude that for every unit increase in CURNTWIN, ATTEND sees an increase by 38.6325. In laymen's terms, for every additional win a baseball team has, their stadiums are expected to experience an increase in attendance by about approximately 38 to 39 people.
OLS models are very popular approaches to regression analysis, and in these models we're dealing with dependent variables that have continuous values.

Regression with Dichotomous Dependent variables

Lets change that up and assume that instead of baseball wins and attendances, you want to find out the probability that a person attends college given the percentage level of their parental wage. We can just write that as...


 or simply...

We're going to move away from the linear combination of the independent variables (LCIV) because they actually give off nonsensical results. For instance, a regression equation with a continuous variable like income can provide useful information when you generate graphs, like a scatter plot, but with dichotomous variable as Y, we get something where all the plot points are scattered to either one value or the another, like this:

The points are bounded to either 0 or 1, which makes a lot of sense (if you're familiar with dummy variables) because 0 and 1 represent outcomes (0 ="didn't attend college" ; 1 = "attended college").

So the rectification is to take a non-linear transformation of the linear combination of independent variables, looking like this:


The properties we expect function to have reflect the discrete outcomes of interest (as related to qualitative variables). In that role, function F is expected to output 0 as the linear combination of independent variables tend towards negative infinity, and F is expected to output 1 as the LCIVs tend towards positive infinity. That's just a mathematical way of stating this hypothetical point, that as we see a continual increase (or decrease) in the value(s) we get from the LCIVs, we should also gradually expect the outcome of interest (Y) to be a likely occurrence (or likely nonoccurrence). 

The corresponding math notations usually looks like this:

F(-) = 0
F(+) = 1

and thus, this transformation of the independent variables means that our probability belongs in the range of 0 and 1, or...

In context, lets assume that we see the value for as very high, indicating high parental income; in that case, then we can assume that the probability of a person going to college is virtually 1, or very likely to happen.

Conclusions

The basic logic of logit and probit modeling is grounded on this reasoning, and will often give similar results in their estimations. Instead of trying to see the effects of the X var(s) on the continuous Y variable, like the effects of income on overall consumption, you're trying to see the how the X var(s) influences the probability that dichotomous Y variable will occur; in other words, the likelihood of outcomes.

It should be understood and reminded that yes, we can expect a higher or lower probability of an event occurring but that does not mean it will indeed happen or not. The ultimate outcome can most definitely go the other way. 

Note: Regression equations always include error terms, which were purposely excluded in this post. Just know that you are to always include the error term when conducting analyses for academic or professional work.


Sources:

Heavily borrowed and influenced from:

Read More »

Friday, January 9, 2015

Visualizing the Middle East

A neat interactive graphic by Information is Beautiful depicts the network relationships among the key players in the Middle East (click on the picture to see it).

Notes:
  • The amount of Sunni to Shia groups is astounding. The world simply thinks about the Muslim community as just one community, but the sectarian divides are serious among the Middle Eastern Sunni and Shia groups. Although I was aware of the sectarian divide, I dont think it was until ISIS's rise in 2014 that I began to see just how serious it can get between differing Muslim groups.
  • ISIS hates...everyone? I didn't really see that coming. I knew ISIS was infamous, but I didn't think they practically had enemies all around them. Maybe this doesnt mean too much, being that al Qaeda, the group it spawned from, has way more negative connections. However, AQ has way more years of existence and picked up more negative relationships over time. 
  • 'STATE OF PALESTINE": I know there are many of those out there who have sympathies for what happened to the Palestinian people as Israel grew and probably want to use the term Palestinian state as a way to recognize its existence, but its just not correct. Palestine is NOT a recognized state, and never was. If it was, then the modern day Israel probably wouldn't have existed.
Read More »

Sunday, January 4, 2015

8 ways a college gap year can benefit you


When I graduated college, I decided to take a gap year from school. It’s not because I was tired of school: in fact, I usually looked forward to attending college. I thought a year off would just help me get time to take the GREs, and maybe I could get a job in the meanwhile.

But what took me a while to realize is that taking a gap year actually helped me grow in other ways I never thought I would, or could. So here’s a few things to think about: 8 ways a college gap year can benefit you.

1. A chance to see things on the other side.

If you're taking a gap year after 18 or so years of formal education you will begin to realize that life is different on the other side. The fall and spring semesters, after going through so much routine, will be filled with a lot of void, and its weird. All of your other friends will continue with their studies and you're not. Sometimes you may get distanced from other friends, as your interests end up differing.

This may not seem beneficial but best believe it is. When we are in school, we tend to misunderstand what many call the "real world" because many of us haven't experienced it just as yet. The reality is, unless you're working at school institution right after you graduate, you're not going to be in school for very long, and the school norms you are so used to are not the same as business norms you will have to learn about. It just puts you in perspective.

2. Opportunity to enjoy leisure

While you're on that gap year you might as well have fun with the free time you have. Its most likely a top 3 reason why you're taking the gap year, so why not catch up on your favorite books and TV shows, discover new music, or go on vacation? Chances are you will need it, but we know you will enjoy it, and you probably won't get a chance like that for a long time once you return to formal education.

3. Saving money

I don't know about you, but I'm pretty happy that I don't have to worry about taking out $20,000 in loans just to pay for another years' worth of education. This is especially so if I don't like the direction I'm going with my current major. So while I'm off, I might as well take the time assess whether it will be worth the extra money to continue down this path.

4. Time to learn and grow / Self-assessment

This is quite important because it gives you the chance to learn more about yourself. You learn more about your passions, learn more about what you like, and what you dislike. You think about things you've done in the past and whether you would like to continue doing it in the future. You also get to think about what you could have learned to do better and what you can do to improve yourself in what ever area you want to improve in. Depending on that area, you might be motivated to return to college.

5. Skills-assessment

I know this is closely tied to the previous point, but I find this one huge enough to stand on its own.

Before you apply for a job, it is important to distinguish between the skills you have and the skills you need to attain. When you’re going through a gap-year, sometimes you may apply for jobs you want and realize you’re not qualified. So you see that, and it can be discouraging for you because you don’t have the skills, or it can be encouraging for you to learn what you need to know before you apply for jobs like that in the future. Some skills can be attained during your gap year through outlets not labeled formal education, but there are skills that you will realize can be best attained and practiced if you were in college. It just adds to your motivation and gives you a focus to seek out those sources where you can properly learn the desired skill(s).

6. Self-fulfillment

A gap year is a chance for you to take a breath and do something that you want to do.

Take on a volunteer project or a personal project. Give yourself a chance to go through some growing pains that you really find worth the trouble; its more rewarding that way. Maybe you can spend time building and writing a blog. Maybe you want to learn new things through some massive online open courses (MOOCs), like code or maybe a new language. Maybe you want to do some research on topics that interest you, or maybe you want to join and volunteer for a cause. What ever it is you want to do that can give you a real sense of personal achievement, a gap year is a special time to get those done.


7. A chance to develop professionally

A gap year also gives you a chance to explore careers and increase your work experience, through paid employment or voluntary work. It helps you develop your professional networks, improves your skillset, and it gives you some experience to put on the resume.

It will look very good on a resume and it shows that you've been busy during your time off. Things like this are very notable to future employers and colleges.

8. A better focus when you return

During your gap year, once you find that crossover between your interests and you think you can pursue you begin to understand more specifically what you want out of college (other than that diploma). Whether its of the undergraduate, graduate or post-graduate kind, you never want to leave feeling that you graduated with a useless degree. That very feeling can be a reason for pursuing a gap year in the first place. Maybe there was some kind of skill that you would find very useful that you failed to pick up as an undergrad or your previous years of schooling. The gap year will give you the time to think about topics such as your pursuit intentions and the channels that can help you with that pursuit, which may help you realize which college you should really attend.

Conclusion

If or when you decide to take a gap year, remember that it can indeed be a welcome break, but it can also be frustrating. It may be a way to regroup and recharge your battery or a way to explore your life in ways that you never had time to before. However, you can also end up zoned out in front of the TV watching reruns or steamed up behind a computer wasting your life away, if you have lofty plans for the gap year. I can't stress enough just how easy it is to end up in the latter.
Read More »