Announcement

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

  • Stata Crashes while attempting collapse

    Hello All,

    I run Stata SE 15.1 on a computer with 32 GB of RAM. I use Ubuntu as OS. And I have already set max_memory to 32g.

    I'm working with a large dataset (around 7 GB). When I attempt a collapse of a few variables, Stata simply crashes. No error message, nothing.

    Any suggestions on how to deal with the issue?

    Thanks!

  • #2
    It's hard to say without knowing about your data. Two generic suggestions to troubleshoot:
    1) if you can, ensure that your Stata is most up to date by running -update query-. It is possible this is caused by bug that has since been fixed.
    2) Does -collapse- succeed when using fewer summary stats as part of the command. That is, perhaps collapse chokes Stata because it is being asked to do too much at once (this shouldn't be the case, but it could be an explanation), and that means it can be worked around if necessary.
    3) Does the code work (possibly under conditions of #2) with a lower limit for max_memory, say 16g ?

    Comment


    • #3
      I agree with Leonardo Guizzetti. Although the aim of collapse is to produce a (much) smaller dataset, intermediate calculations usually mean more variables temporarily.

      Adding to his list

      4) You say that you want only a collapse on a few variables. So drop the unwanted variables first.

      5) compress first any way.

      EDIT: added #5.
      Last edited by Nick Cox; 21 Oct 2021, 09:55.

      Comment

      Working...
      X