Announcement

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

  • Quadratic form of regression model

    Hello,

    When I scatterplot the relationship between CO2 and GDP, I see an inverted-U shape between them. Therefore, is this possible if I put a quadratic form of log form of these two variables, like: lnCO2 = bo + b1 lnGDP + b2 lnGDP^2+ error term? Thank you

  • #2
    Well a quadratic relationship between CO2 and GDP doesn't necessarily translate into a quadratic relationship among their logarithms. Nevertheless, if we are talking about a general U-shaped relationship this approach might work. Remember to use factor variable notation for the quadratic term (-help fvvarlist-) if you decide to do this, so that you can then rely on -margins- and -marginsplot- afterward.

    Comment


    • #3
      Thank you for your answer. But I mean that: if CO2 and GDP have inverted U-shape relationship, so when I transfer to quadratic form (lnCO2 and lnGDP), does lnCO2 and lnGDP still have inverted U-shape relationship?

      Comment


      • #4
        Taking log will not be same as using quadric equation. Normally log is used when we face heteroskedasticity problem. It will be better to use quadratic form instead log-linear.
        You may scatter plot values after transforming variables into log to see if it is still U-shaped or not.
        Regards

        Sajid Jaspal

        Comment


        • #5
          Thank you, Sajid Jaspal

          Comment


          • #6
            I'd post the data if you can, perhaps 100 or 200 countries. Are the variables totals or adjusted for population? Quadratics often have quite wrong limiting behaviour, which may or may not bite.

            Comment


            • #7
              To see if you need the logarithm transformation I would just start with this

              Code:
              twoway scatter co2 gdp || fpfit co2 gdp
              gen lnco2 = ln(co2)
              gen lngdp = ln(gdp)
              twoway scatter lnco2 lngdp || fpfit lnco2 lngdp
              After than you can use something like fp <lngdp> : reg lnco2 <lngdp> to fit that model, assuming the log transformation works better. The fractional polynomial is less restrictive than a quadratic thus mitigating the problems Nick alluded to.
              ---------------------------------
              Maarten L. Buis
              University of Konstanz
              Department of history and sociology
              box 40
              78457 Konstanz
              Germany
              http://www.maartenbuis.nl
              ---------------------------------

              Comment


              • #8
                I am always very impressed by fractional polynomials when Patrick Royston is using them. For my own data or my colleagues' data they don't always track the data well and they produce an equation that neither I nor my colleagues want to have to explain or defend in presentations or in papers to audiences or reviewers not yet familiar with the idea.

                I still want to see the data and then different enthusiasms can all be put to the test. I'd add to the list inverse polynomials such as

                Code:
                twoway function 1/(1/x  + 1 + x), ra(0 10)
                which can be fitted as generalised linear models with reciprocal link. Clearly the parameters are at choice but in principle rising limbs, falling limbs and turning points are all tuneable to some degree and the limiting behaviour is often plausible. https://www.jstor.org/stable/2528220 is the canonical reference.

                Comment


                • #9
                  Thanks Nick Cox

                  Comment

                  Working...
                  X