Announcement

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

  • Quadratic Function

    Hi, I am trying to create a quadratic function in Stata. I have tried a few things but nothing seems to work. An error message appears.I have a few other variables within my regression so I am not sure if that's the reason as to why it isn't working. So far I have tried:

    twoway (function y=-0.45+0.17*x-0.11x^2+0.075*g+0.095*h+0.16*j, range(0 10))

    Then I tried implying it to:

    twoway (function y=-0.45+0.17*x-0.11x^2, range(0 10))

    Any thoughts?


  • #2
    Missing an asterisk (*)

    Comment


    • #3
      the range only applies to "x" so Stata is confused by your first statement

      your second statement has a typo - insert "*" between the "11" and the "x^2" (as you have between the "17" and the "x"

      Comment


      • #4
        To add to earlier replies:

        With nothing else said

        y=-0.45+0.17*x-0.11x^2+0.075*g+0.095*h+0.16*j,

        defines y in a space with (x, g, h, j) as other coordinates. What are you expecting to be the result graohically?

        Comment


        • #5
          This would result in a 4D plane.

          You'd need to choose some values for two of your variables. Even if Stata could make this, (which I could never imagine StataCorp investing the time and money in) trust me, you wouldn't wanna be tasked with reading it and understanding the figure that this would produce

          Comment

          Working...
          X