Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Turning point in quadratic function

    Hello everyone,

    I am running a quadratic regression function as below:

    lfare = 6.3581 – 0.0108lpassen – 0.8842ldist + 0.1028ldistsq + 0.0135y2011 + 0.0098y2012 + 0.0769y2013

    Where:
    lfare = average ticket price in logarithm
    lpassen = number of passengers per day in logarithm
    ldist = distance in logarithm
    ldistsq = ldist^2
    y2011, y2012, y2013 = dummy variables for year 2011, 2012 and 2013, respectively.

    I have already found out the turning point of the function equals: -(β2/2*β3) = -(-0.8842/2*0.1028) = 4.3.
    However, I do not know to find out that whether the turning point is outside the range of the data or not.
    I have an idea that is to draw the line of the above quadratic regression function to find out but don't know how to.

    I am looking forward to your help. Thank you in advance.
    Kind regards


  • #2
    Just run -summ ldist- and see whether 4.3 lies between the minimum and maximum values of ldist. Now, depending on what you're trying to conclude, you may have to apply some judgment. If the turning point is clearly towards the middle of that range, then you are likely working with a process that has a reasonable approximation by a quadratic model. But it is also possible to have a curvilinear, but not truly quadratic, data generating process (e.g. a logarithmic or square root relationship, to mention just a couple of possibilities that are not quadratic and aren't even U-shaped) and still get a turning point that lies in the interval but near one or the other edge. So if you are truly committed to identifying a true quadratic process in the data, or a U (or inverted-U) shaped relationship, you should be cautious about accepting a turning point that is not very central. And graphical exploration is I think very important in guiding your decision making about this.

    To do graphical exploration, I recommend that you re-run your regression using Stata's factor-variable notation. That means ditching the ldistsq variable, and the y2011, y20212, and y2013 variables. Instead of the year dummies, have a single variable, year, that takes on the values 2011, 2012, 2013, and whatever the other year in your data is. Then run the regression as:
    Code:
    regress lfare lpassen c.ldist##c.ldist i.year
    Then to get our graph, pick about 10 values of ldist that are about equally spaced and run from approximately the lowest to highest values of ldist in the data and run:
    Code:
    margins, at(ldist = (put_the_list_of_values_of_ldist_here))
    marginsplot
    That will show you what your regression model predicts. Then compare that with an actual scatterplot of lfare vs ldist and see if the scatter points look like they are reasonably consistent with that quadratic curve.

    Comment

    Working...
    X