Announcement

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

  • why there is 0 observation when I enter sum command in stata, but there are non-zero observation in the excel data

    The problem is like below:

    Variable | Obs Mean Std. dev. Min Max
    -------------+---------------------------------------------------------
    HHNO | 0
    PPN | 0
    QRTYP | 0
    SFAREAGP1_MT | 0
    SFAREAGP2_MT | 0

    However, there are data observation in excel, for example, there are PPN="01","02","03" and SFAREAGP2_MT="9","5" etc
    Once I imported this excel data into stata, I entered sum commands and they gave me all 0 observation
    Last edited by chi kitchun; 02 Oct 2023, 00:47.

  • #2
    Chi:
    welcome to this forum.
    Have you already ruled out blanks? If that were the cause, please see -help string functions-.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Originally posted by Carlo Lazzaro View Post
      Chi:
      welcome to this forum.
      Have you already ruled out blanks? If that were the cause, please see -help string functions-.
      ruled out already

      Comment


      • #4
        since you did not provide a -dataex- example (please read the FAQ), I can only guess but my guess is that your variable is a string variable; look at -describe- or -codebook- for this variable

        Comment

        Working...
        X