Announcement

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

  • understanding matsize

    So im getting a matsize to small error..
    first problem is I have matsize maxed out, at 800..
    second problem, how do i calculate my number of variables in my matrix?

    Model contains a total of 4,964 observation
    anova DependentVariable(5 unique) CaseIdentifier(1415 unique) IndependentVariable(5 unique),repeted(IndependentVariable)
    If someone could explain how its calculated, mostly for understanding I would appreciate it.
    And if someone have a solution around the matsize i would love to hear it. as of now I kind of given up on doing a anova, since its creating problems while its as the most simple level.

    Cheers


  • #2
    The matrix calculated for an analysis of variance has a size which depends on the number of predictor variables. The CaseIdentifier variable alone puts you well over the limit. If your maximum matrix size is 800, that implies you are using Stata/IC. If you will need to run very large models like this often, it is probably worth your while to upgrade to Stata/SE or MP, which will allow you a matrix size of 11,000 (corresponding to 10,998) predictor variables. (See -help limits-.)

    Failing that, why are you including a case identifier variable in your model anyway? It is likely that your problem is better solved by some other command that deals with whatever problems prompt you to include the case identifier but doesn't have to build it into the matrix for analysis. If you explain the underlying problem you are working on, there is probably an alternative approach that can be suggested.

    Comment


    • #3
      [QUOTE=
      Failing that, why are you including a case identifier variable in your model anyway? It is likely that your problem is better solved by some other command that deals with whatever problems prompt you to include the case identifier but doesn't have to build it into the matrix for analysis. If you explain the underlying problem you are working on, there is probably an alternative approach that can be suggested.
      [/QUOTE]
      Dear Clyde.
      I'm doing a study on Quality of life on pacemaker patients. The data is collected at 4 different times: Before the procedure, 3 month after, 1 year after and 3 years after.
      I wanted to include the case identifier to control for the fact that its the same patients in each group.
      My statistical knowledge isn't that high and the idea to use anova with repeated measurements, is something I got from a third parti.
      Since my edition of stata cant handle the model, I might be better of, leaving the repeated measurement and just do a normal regression without the caseID

      Comment


      • #4
        You can do this with your flavor of Stata. You just can't do it with the anova command.

        Do this:

        Code:
        xtset CaseIdentifier
        xtreg DependentVariable i.IndependentVariable, fe
        This will run even though you have more cases than your -matsize- can handle, because the within-case repetitions are handled differently and don't require a matrix.

        In this code, I've assumed that your 5-level IndependentVariable is intended to be treated as 5 separate categories, not as a numerical 1 through 5 variable. If that assumption is incorrect, remove the i. from the -xtreg- command.

        Read the [XT] manual section on -xtreg, fe- to learn what this command is about. You may want to run -margins IndepencentVariable- afterwards to get expected means of the DependentVariable in each level of your IndependentVariable.

        Whatever you do, don't just run a flat-anova that ignores the repetitions within subjects: that'll just get you bogus results.

        Comment


        • #5
          Thanks for the replies. I'll give it a go over the weekend

          Comment

          Working...
          X