Sunday, January 17, 2016

A Primer on Linear Regression and its Associated Misconceptions


Welcome to the new year and the first Prophage blog post for 2016! This is already looking like it will be a great year for science and blogging. But enough with the pleasantries, let's dive into some science.


I wanted to start the year off with post about math. I know, I know, math is an intimidating way to start the year, but don't run off yet! I swear that this will be painless and we will even learn something new! We are going to keep things simple and focus on an elegant paper that presents some misconceptions about a complicated topic. This topic is multiple linear regression. My goal is to introduce you to the topic of linear regression and prepare you to read this week's paper.

What is Linear Regression & When Should I Use It?

Before we talk about multiple linear regression, let's cover simple linear regression. In its most simplified form, linear regression is a method for modeling the interaction between an independent (i.e. explanatory) and dependent variable. This is often plotted as a scatter plot with the dependent variable on the y axis, the independent variable on the x axis, and the linear regression model drawn as a line (see figure below). 

We commonly use this approach when we want to predict a dependent value given an independent value. An example of this (in the plot below) is tree age vs diameter. We know that tree diameter depends on age, but what if we want to predict the diameter (dependent variable) of a tree at a given age (independent explanatory variable). We can perform a linear regression to create a simple predictive model (shown as the line) to tell us what the diameter is likely to be at a given age. In our example, at age 30 it looks like the tree diameter will be 5 inches. The slope of the line is a coefficient that represents the relationship between the explanatory (age) and dependent (diameter) variables.

What is Multiple Linear Regression & When Should I Use It?

A simple example of linear regression modeling.
Here we are modeling the relationship between
tree age and diameter. SOURCE
Now what if we want a better model that includes more than one explanatory variable. For instance, what if we want to predict tree diameter given it's age and the average summer temperature of the climate the tree lives in? We might expect a tree in a colder climate to have less of a diameter compared to a tree in a warm climate. Once we start considering more than one variable, we are doing a multiple linear regression. It's that simple. Much like in a simple linear regression, both explanatory variables (age and temperature) have a coefficient that represents the relationship between the explanatory and dependent variable. Think of this relationship coefficient as the slope for each explanatory variable.

What is the Misconception?

As Frasier TR expertly points out, there is a lot of confusion around interpreting these relationship coefficients. People often interpret these as being the independent relationships between the explanatory variables (age and temperature) and the dependent variable (diameter) given the full range of values of the explanatory variables. This is unfortunately not true. These coefficients only represent the relationship (i.e. slope) between their associated independent variable and dependent variable when the other independent variable is zero. So to use our example, the coefficient associated with age only represents the relationship (slope) between age and diameter when the temperature is zero. Frasier expertly outlines why this is actually a nontrivial point that has likely led to many erroneous scientific conclusions. Frasier's explanation is incredibly well done so I will direct you to followup with this post by reading the paper and seeing his examples for why this distinction is important.

Wrapping It Up

I know this was a math heavy post, but I hope you enjoyed it and even learned a little. After reading these brief paragraphs, you should have a general feel for what linear regression is and why it is useful. This will prepare you to dive into the Frasier paper that is absolutely with a read. And of course, I want to end by pointing out that this is a complicated topic that you can read entire books about. We did not even scratch the surface in this post, but at least we took the first step toward a better understanding of math and how it can be used for prediction.

Questions, comments, or concerns? Want to discuss any of these points? Add a comment below. I would love you hear what you think.


Works Cited

Frasier TR (2015). A note on the use of multiple linear regression in molecular ecology. Molecular ecology resources PMID: 26650184



6 comments:

  1. A good blog always comes-up with new and exciting information and while reading I have feel that this blog is really have all those quality that qualify a blog to be a one.
    Machine learning Online Training

    ReplyDelete
    Replies
    1. Prophage: A Primer On Linear Regression And Its Associated Misconceptions >>>>> Download Now

      >>>>> Download Full

      Prophage: A Primer On Linear Regression And Its Associated Misconceptions >>>>> Download LINK

      >>>>> Download Now

      Prophage: A Primer On Linear Regression And Its Associated Misconceptions >>>>> Download Full

      >>>>> Download LINK Sx

      Delete
  2. How I Got My Husband Back. My husband who departed from me 2 years ago started calling me and wanted us to get back Dr Sambo love spell made my husband to reconcile with me. When he came back he was all on me kissing and rubbing on me telling me how much he missed me and loves me, Dr Sambo is spectacular in repairing relationship! His work is wonderful, i am glad to let you all know that this spell caster have the power to bring lovers back. Because i am now happy with  my husband. I highly recommending this service for those experiencing difficulties trying to restore there relationship. he is the real deal. you can reach Dr. Sambo his contact details seen below: divinespellhome@gmail.com  chat live with him on WhatsApp now +2348145810121

    ReplyDelete
  3. I'm here to testify about what DR. OYAGU did for me. I have been suffering from (GENITAL HERPES VIRUS) disease for the past 2 years and had constant pain and inching, especially in my private part. During the first year, I had faith in God that i would be cured someday.This disease started circulating all over my body and I have been taking treatment from my doctor, few weeks ago I came across a testimony of Shayla Bosschart on the internet testifying about a Man called DR. OYAGU on how he cured her from 7 years HSV 2. And she also gave the email address of this man, advise anybody to contact him for help on any kind of diseases that he would be of help, so I emailed him telling him about my (HSV 2) he told me not to worry that I was going to be cured!! Well, I never doubted him I have faith he can cure me too,, DR. OYAGU prepared and sent me Healing Soap, roots and herbs which I took. In the first one week, I started experiencing changes all over me, after two weeks of using his Roots/ Herbs, Oil and Soap, I was totally cured. no more inching , pain on me anymore as DR. OYAGU assured me. After some time I went to my doctor to do another test behold the result came out negative. So friends my advise is if you have such disease or know anyone who suffers from it or any other disease like HPV, HBV, HIV, ALS, HBP, CANCER etc. you can contact DR. OYAGU for help via email} oyaguherbalhome@gmail.com whatsaap him through his mobile} +2348101755322. , Thanks once again DR. OYAGU for making me a happy woman again.

    ReplyDelete
  4. Hello everyone..Welcome to my free masterclass strategy where i teach experience and inexperience traders the secret behind a successful trade.And how to be profitable in trading I will also teach you how to make a profit of $7,000 USD weekly and how to get back all your lost funds feel free to Email: (carlose78910@gmail.com )
    Via whatsapp: (+12166263236)

    ReplyDelete
  5. Prophage: A Primer On Linear Regression And Its Associated Misconceptions >>>>> Download Now

    >>>>> Download Full

    Prophage: A Primer On Linear Regression And Its Associated Misconceptions >>>>> Download LINK

    >>>>> Download Now

    Prophage: A Primer On Linear Regression And Its Associated Misconceptions >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete