Announcement

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

  • no observations

    Hi,
    I am conducting a descriptive analysis on Stata.
    The code is like
    egen total = total(sales), by(name AAA)
    egen total = total(sales), by(name BBB)
    egen total = total(sales), by(name CCC)

    Basically, there are 100 something rows of codes (AAA, BBB, .....) to analyse the sales.

    However, some of the raw, for example, may have no observations, which will stop the analysis process (no observations r(2000)).
    Is there any command that I can not let the program stop and finish all the analysis?
    Thanks

    Dan
    Last edited by Daniel Tsai; 17 Feb 2023, 03:53.

  • #2
    The point of using total is to get a confidence interval. Is that your goal? Because otherwise you can get the totals in a single variable with


    Code:
    egen total = total(sales), by(name type)
    and a nice table any number of ways.

    New members should please read the FAQ Advice https://www.statalist.org/forums/help all the way down to #18.

    Comment

    Working...
    X