Announcement

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

  • Number of Observation Missing

    Hi everyone, I am fairly new in using stata. So many feedbacks is very much appreciated. I am currently doing my master thesis research and I am stumped on the missing observation.

    I have a total number of observation data equal to 18.102
    Click image for larger version

Name:	Summarize.png
Views:	1
Size:	10.3 KB
ID:	1755506


    However, when i run the command to do didregress, the number of obs turns only into 96. as the picture below.
    Click image for larger version

Name:	Didregress.png
Views:	1
Size:	20.3 KB
ID:	1755507




    Here are some snippet of the data that i am using.
    Click image for larger version

Name:	Data.png
Views:	1
Size:	41.5 KB
ID:	1755508



    For your information, 'Tahun' means year.


    Thank you so much in advance for your help.
    Last edited by Irlandi Paradizsa; 06 Jun 2024, 13:46.

  • #2
    Are you sure you had all 18,102 observations in the dataset when running the regression? What do you get if you run

    Code:
    didregress (konsumsi) (treatafter) in 2000/4000, group(id) time(tahun)

    Comment


    • #3
      Originally posted by Andrew Musau View Post
      Are you sure you had all 18,102 observations in the dataset when running the regression? What do you get if you run

      Code:
      didregress (konsumsi) (treatafter) in 2000/4000, group(id) time(tahun)
      Dear Andrew, thanks for the reply. Yes I am sure for the dataset used. However after running the command, the it returned like this. Any idea why?
      Click image for larger version

Name:	in2000.png
Views:	1
Size:	20.4 KB
ID:	1755531

      Thanks.

      Comment


      • #4
        Let's see the first 150 observations then. Copy and paste the result of the following:

        Code:
        dataex, count(150)
        Do not post this as a screenshot. Copy and paste the text as is.

        Comment


        • #5
          Originally posted by Andrew Musau View Post
          Let's see the first 150 observations then. Copy and paste the result of the following:

          Code:
          dataex, count(150)
          Do not post this as a screenshot. Copy and paste the text as is.
          hi Andrew, thanks for the reply. I had some help outside this thread. It was actually to create a new set of ID. I did not understand why, but the former ID didn't work but as soon as it changes into a new ID, the number of observation is not missing anymore.

          Comment

          Working...
          X