Announcement

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

  • Projection/ Forecasting of Population census data in stata

    Hi,

    I want to project population census data for a particular year. I have the census data for the periods 2001 and 2011. I need population data for the years 2005 and 2015. How do I project or forecast this in Stata?

    Any help would be greatly appreciated.
    Thank you
    Radhika

  • #2
    The command ipolate allows you to easily interpolate and extrapolate data in a linear fashion. If you want to do geometric interpolation, you can do that by first taking logs of the data and then interpolating linearly using ipolate.

    Forecasting future values of the population is generally a tricky thing. For India, you can take a look at this document to see how the Registrar General's office itself does it; you may even want to use their numbers directly rather than coming up with your own.
    Last edited by Hemanshu Kumar; 07 Jul 2023, 05:54.

    Comment


    • #3
      Originally posted by Hemanshu Kumar View Post
      The command ipolate allows you to easily interpolate and extrapolate data in a linear fashion. If you want to do geometric interpolation, you can do that by first taking logs of the data and then interpolating linearly using ipolate.

      Forecasting future values of the population is generally a tricky thing. For India, you can take a look at this document to see how the Registrar General's office itself does it; you may even want to use their numbers directly rather than coming up with your own.

      Dear Hemanshu Kumar,

      Thank you very much for your kind reply.

      Thank you for sharing the document. I am working with the following district level data.
      District urban_pop_2001 urban pop_2011
      1 478520 597846
      2 407396 536503
      3 5759987 8749944
      4 1012691 1211195
      5 706850 920239
      6 344875 425952
      7 396089 501978
      8 148090 174974
      9 222724 239508
      10 274238 329533
      11 729302 996086
      12 542998 629010
      13 881917 1049539
      14 342183 379309
      15 852621 1056228
      16 304673 376763
      17 299020 355501
      18 75382 80988
      19 625523 761192
      20 198292 233704
      21 282715 308362
      22 982128 1245413
      23 420837 490348
      24 571010 623727
      25 507202 599078
      26 206353 334061
      27 387913 418981
      How will I give interpolate command here? What is the right specification? I want to know the projected values for the years 2005 and 2015.

      I would be very grateful if you could help me with this.

      Thank you.

      Radhika



      Comment


      • #4
        A simple geometric interpolation and extrapolation can be done as follows:

        Code:
        clear
        input byte district long(urban_pop_2001 urban_pop_2011)
        1    478520    597846
        2    407396    536503
        3    5759987    8749944
        4    1012691    1211195
        5    706850    920239
        6    344875    425952
        7    396089    501978
        8    148090    174974
        9    222724    239508
        10    274238    329533
        11    729302    996086
        12    542998    629010
        13    881917    1049539
        14    342183    379309
        15    852621    1056228
        16    304673    376763
        17    299020    355501
        18    75382    80988
        19    625523    761192
        20    198292    233704
        21    282715    308362
        22    982128    1245413
        23    420837    490348
        24    571010    623727
        25    507202    599078
        26    206353    334061
        27    387913    418981
        end
        
        gen long urban_pop_2005 = .
        gen long urban_pop_2015 = .
        
        reshape long urban_pop_ , i(district) j(year)
        
        gen ln_urban_pop_ = ln(urban_pop_)
        
        ipolate ln_urban_pop_ year, gen(i_ln_pop) epolate by(district)
        replace urban_pop_ = exp(i_ln_pop) if inlist(year, 2005, 2015)
        
        drop i_ln_pop ln_urban_pop_
        
        reshape wide
        However, I want to underline that I do not really recommend this method for extrapolation to 2015: those projections should not be based on just 2001 and 2011 overall population numbers.
        Last edited by Hemanshu Kumar; 07 Jul 2023, 07:37.

        Comment


        • #5
          Originally posted by Hemanshu Kumar View Post
          A simple geometric interpolation and extrapolation can be done as follows:

          Code:
          clear
          input byte district long(urban_pop_2001 urban_pop_2011)
          1 478520 597846
          2 407396 536503
          3 5759987 8749944
          4 1012691 1211195
          5 706850 920239
          6 344875 425952
          7 396089 501978
          8 148090 174974
          9 222724 239508
          10 274238 329533
          11 729302 996086
          12 542998 629010
          13 881917 1049539
          14 342183 379309
          15 852621 1056228
          16 304673 376763
          17 299020 355501
          18 75382 80988
          19 625523 761192
          20 198292 233704
          21 282715 308362
          22 982128 1245413
          23 420837 490348
          24 571010 623727
          25 507202 599078
          26 206353 334061
          27 387913 418981
          end
          
          gen long urban_pop_2005 = .
          gen long urban_pop_2015 = .
          
          reshape long urban_pop_ , i(district) j(year)
          
          gen ln_urban_pop_ = ln(urban_pop_)
          
          ipolate ln_urban_pop_ year, gen(i_ln_pop) epolate by(district)
          replace urban_pop_ = exp(i_ln_pop) if inlist(year, 2005, 2015)
          
          drop i_ln_pop ln_urban_pop_
          
          reshape wide
          However, I want to underline that I do not really recommend this method for extrapolation to 2015: those projections should not be based on just 2001 and 2011 overall population numbers.
          Thank you very much for the codes and for sharing your insights on this.

          Comment

          Working...
          X