Announcement

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

  • ineqdeco - too many values

    Hi,

    (I had a similar topic on a different thread, but now its more to do with the ineqedco command. I also see a thread that that looks into this specific problem with ineqdeco, but the error code is different - r(2000) - https://www.statalist.org/forums/for...oo-many-values . Therefore, I post a new thread)

    I am using the ineqdeco command to find inequality parameters. I have a very large panel dataset and I need the within and between inequality measures. Here is the structure of my data!

    Year OrgId Person_id Person_Income
    1 1 1 100
    1 1 2 200
    1 1 3 300
    1 1 4 400
    1 2 5 25
    1 2 6 30
    1 2 7 35
    1 2 8 40
    2 3 9 10
    2 3 10 15
    2 3 11 20
    2 3 12 25

    I use the following code:
    Code:
    local years_w 1999 2000......2013
    foreach y of local years_w {
    qui ineqdeco Person_Income if year == `y', by(Person_id)
    }
    being a large panel (?), the ineqdeco throws an error: "too many values". r(134)

    Is there any way to get around this problem?

    Thanks,



  • #2
    I am puzzled why you're starting a new thread on this question -- because you are neither continuing nor referring to immediately previous discussion.

    The relevant thread is https://www.statalist.org/forums/for...ength-exceeded (the best cross-reference here, not the one you give). Although the thread title doesn't flag the present problem, your own post at #7 started the discussion.

    ineqdeco (SSC, as you are asked to explain) is dependent on levelsof and the best guess remains that it's levelsof that is throwing you out.
    The point could be settled by showing us a program trace.

    You don't (and indeed perhaps can't) give a data example that shows this: the whole point is that this could bite with very large datasets, meaning those with many distinct identifiers.

    The best solution I can see is to use runby (SSC) as recommended and exemplified by Robert Picard .in the thread just cited.

    There is a small downside to continuing in that thread because its title is not directly relevant to your current problem, but at a minimum people contributing to this thread should be looking at Robert's solution.
    Last edited by Nick Cox; 25 Oct 2017, 07:05.

    Comment


    • #3
      Thanks Nick.

      The only reason I start a new thread is that the title of the thread https://www.statalist.org/forums/for...ength-exceeded has a different title.
      But yes, I should have referred to this one.

      Anyway, thanks for your suggestion. I will try the runby and hope it works for me!

      Comment

      Working...
      X