Announcement

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

  • Question about Seq.SS and the ANOVA sequential table

    Before I post my actual data maybe somebody can answer my question in the abstract.
    Basically I have five variables x1, X2, X3, X4 and X5.
    When I do:
    > anova Y c.x1 X2 c.X3 c.X4 c.X5, sequential
    I get the following:

    Number of obs = 52 R-squared = 0.6867
    Root MSE = 146.759 Adj R-squared = 0.6526

    Source | Seq. SS df MS F Prob>F
    -----------+----------------------------------------------------
    Model | 2171373.5 5 434274.7 20.16 0.0000
    |
    x1 | 1075476.9 3 358492.3 16.64 0.0000
    X2 | 1095310.8 1 1095310.8 50.85 0.0000
    X3 | 0 0
    X4 | 0 1 0 -4.e+303 1.0000
    X5 | 0 0
    |
    Residual | 990762.41 46 21538.313
    -----------+----------------------------------------------------
    Total | 3162135.9 51 62002.665


    But when I do:
    > anova Y c.x1 X2 c.X3 c.X4, sequential
    I get this:

    Number of obs = 52 R-squared = 0.6865
    Root MSE = 145.22 Adj R-squared = 0.6599

    Source | Seq. SS df MS F Prob>F
    -----------+----------------------------------------------------
    Model | 2170962.8 4 542740.7 25.74 0.0000
    |
    x1 | 252132.68 2 126066.34 5.98 0.0049
    X2 | 1918613.9 1 1918613.9 90.98 0.0000
    X3 | 0 0
    X4 | 216.20644 1 216.20644 0.01 0.9198
    |
    Residual | 991173.11 47 21088.79
    -----------+----------------------------------------------------
    Total | 3162135.9 51 62002.665


    Now my problem is, the Seq. SS for x1, X2, should not change just because I added X5.
    When I do the same calculation in R or in SciPy they do not change.
    When I have done this on other data sets they do not change.
    So why are they changing for this data set?
    Is there some normal variant of this analysis I'm missing?
    Any help would be greatly appreciated, thank you!
    Greg

  • #2
    PS that's obnoxious of the system to reformat my post and remove all the whitespace before my Table output and make it display like garbage.
    Whoever is administering this site should think harder about such policies. If we put whitespace in maybe we meant it.

    Comment


    • #3
      No. What is wrong is that you did not put the results between CODE delimiters: [CODE] and [/CODE]. See FAQ 12.
      Steve Samuels
      Statistical Consulting
      [email protected]

      Stata 14.2

      Comment


      • #4
        Why ever reformat a person's post?
        Why assume the only time somebody wants to use whitespace is within Code?
        It seems a better assumption that what the user typed is what they meant to type.
        You'd probably trade a boatload of false positives for a few false negatives with the opposite assumption.



        Comment


        • #5
          Searching on the Forum may lead to some threads which probably discuss this topic.

          For example , you may wish to start by reading this thread and check whether it helps.

          With regards to the recommended way of sharing command/output/data, please read the FAQ here.
          Last edited by Marcos Almeida; 05 Oct 2018, 15:54.
          Best regards,

          Marcos

          Comment


          • #6
            Originally posted by Marcos Almeida View Post
            Searching on the Forum may lead to some threads which probably discuss this topic.

            For example , you may wish to start by reading this thread and check whether it helps.

            With regards to the recommended way of sharing command/output/data, please read the FAQ here.
            Thank you for the leads I see there's no easy answer posted.
            Stata is returning Type I Sums of Squares with the sequential option.
            So the first one is SSR(X1)
            The second one is SSR(X2|X1)
            The third is SSR(X3|X1,X2).
            If I leave X3 off the end of the list the first two are still SSR(X1) and SSR(X2|X1) so they should not change.
            But they do.

            Comment


            • #7
              Originally posted by Gregory Grant View Post
              If I leave X3 off the end of the list . . . they should not change. But they do.
              Well, first . . .

              From this
              Code:
              anova Y c.x1 X2 c.X3 c.X4 c.X5, sequential
              I kinda wonder how you managed to get anything like what you show, with three degrees of freedom for x1.

              And from this
              Code:
              anova Y c.x1 X2 c.X3 c.X4, sequential
              ditto for two degrees of freedom for it.

              So, next . . .

              Why don't you

              1. attach your dataset (anova sees only 52 observations, and so if the dataset's too large, you can use
              Code:
              keep if e(sample)
              immediately after fitting the model to keep only those 52) or use dataex on all 52 observations and all six variables, and

              2. attach (or enclose in code delimiters) the exact commands that are giving you these two regression tables?

              This should get to the bottom of your problem most directly.

              Comment

              Working...
              X