Announcement

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

  • J(): 3900 unable to allocate real <tmp>[111731,182559] error in stata 16

    Dear statalist,

    I am estimating a quantile treatment effect using the -changes in changes- estimation technique of Athey and Imbns (2006). I have around 600,000 observations and I am working on 64bit Stata 16 with a 16GB RAM device.

    The state code to estimate the model is written by Blaise Melly available at https://sites.google.com/site/blaise...rams/cic_stata. and another one also by Keith Kranker,

    Keith Kranker. "CIC: Stata module to implement the Athey and Imbens (2006) Changes-in-Changes model," Statistical Software Components S458656, Boston College Department of Economics, 2019. Available at https://ideas.repec.org/c/boc/bocode/s458656.html.



    While I am manged to get results when I use the command by Blaise Melly, though not clear still, I am facing the following error when I use the codes by Keith Kranker.
    J(): 3900 unable to allocate real <tmp>[111731,182559]
    prob(): - function returned error
    cic(): - function returned error
    cic_caller(): - function returned error
    <istmt>: - function returned error

    I am not awarded the source and the remedy of this error.

    Could anyone help me out, please?

    Thank you!


  • #2
    Somehow you're asking with a matrix with 20 billion elements, give or take a few hundred million.


    Code:
    . di %20.0gc 111731 * 182559
          20,397,499,629
    So, what is interesting is where the problem lies. Here are some fairly useless guesses, which aren't exclusive.

    1. Somehow your code is asking for a version of this problem that is too big.

    2. Your dataset is too big for this kind of calculation.

    3. Keith's code is deficient or limited in what it can do. He doesn't appear to be a member here, so you may need to reach out by email to him.

    I don't think the information you give -- which doesn't include your command -- allows much more to be said. I don't think we can expect you to post the dataset here.

    Comment


    • #3
      According to this post, you would need 111731 * 182559 * 8 / 1024 / 1024 / 1024 ~ 152 GB of memory to hold the matrix that you are trying to create. You will either need a computer with much more RAM or a way to rewrite the code that you wish to use.

      Comment


      • #4
        Many thanks, Nick and Daniel,

        I am using the below code.

        cic all Elect_con TREAT POST All: refers all the estimators, quantile treatment effect, DID, QDID. Elect_con: is the outcome variable and TREAT and POST indicates the treatment status and time. I also tried to compress the data to reduce the size but nothing changed. I am trying to reach out Keith. Thank you!


        Comment

        Working...
        X