Announcement

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

  • Tobit - function returned error

    Hello Statalisters,

    I am investigating the effect of a health-information warning on the purchases of several food categories.
    I have a panel data of around 2M observations of the weekly households' purchases in 6 food categories, including prices and quantities in each purchase.
    The period consists of 1 year before the warning and 2 years afterward.
    In addition, I have demographic features of each household, such as income level, education, etc.

    To infer causality, I am estimating a diff-in-diff model against a control category.

    Because my data is censored at 0, I'm running a Tobit model with a lower limit of 0.
    I also added interaction terms with the demographic features (all are dummy variables) to see how the response varies with household characteristics.

    I am using Stata 15.1.

    The command I run:

    tobit gweight ///
    ((ib2.iclass#i.iprod_class)##i.after)##i.low_incom e ///
    ((ib2.iclass#i.iprod_class)##i.after)##i.russian_i mg ///
    ((ib2.iclass#i.iprod_class)##i.after)##i.high_educ ///
    ((ib2.iclass#i.iprod_class)##i.after)##i.elementar y_educ ///
    ((ib2.iclass#i.iprod_class)##i.after)##i.periphery ///
    if week_id > 201444 & week_id <= 201747 ///
    , ll(0) vce(cluster panelist_id) noomit noemptycells

    where:
    • gweight is the quantity (in grams) purchased by household i in week t from category c
    • ib2.iclass#i.iprod_class is the 6 "test" categories, where the "control" category is omitted
    • after is a dummy variable that equals to 1 after the warning and 0 otherwise
    • low_income, russian_img, high_educ, periphery - are all demographic dummy variables
    Now, the problem I encounter:
    I ran the exact Tobit command on the very same data many times before and it worked perfectly fine and returned results.
    But now, when I try to rerun it, I get a weird error saying "function returned error" and the model is not estimated.

    Click image for larger version

Name:	error - stata.png
Views:	1
Size:	15.2 KB
ID:	1537098

    If that might help, I've noticed that if I only run the command with 4 demographic interactions instead of 5 it works fine (no matter which demographics)
    But as mentioned above, it worked fine before with 5 and even 7 demographics.

    No Stata updates were installed during the period since the last time it ran fine (which was about 5 days ago).
    I tried to close Stata and reopen it, but the error remains.

    I also looked for previous posts dealing with that kind of problem and encountered the following post, which seems to resemble my problem,
    but, unfortunately, remained unsolved.

    https://www.statalist.org/forums/for...it-tobit-model


    I'd greatly appreciate any assistance here,
    Thanks,

    Adam





  • #2
    The informative message is the first one. You are asking for more resources than Stata can allocate. You are asking for a matrix with about 1 billion entries. That's big.

    Comment


    • #3
      Thanks for the hint Nick,

      The server memory seems to be captured.
      I release the memory and it is now working

      Adam






      Attached Files

      Comment


      • #4
        Perhaps a generation gap here. I regard most models with more about 7 parameters as too complicated to think about!

        Comment

        Working...
        X