Announcement

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

  • how to fill in missing values of age by individuals

    Hi all,

    Here is an example:

    individual value
    1 .
    1 21
    2 51
    2 .
    2 .
    3 .
    3 15
    3 .

    How can we fill in missing values of age by individuals?

    individual value
    1 20
    1 21
    2 51
    2 52
    2 53
    3 14
    3 15
    3 16

    Thanks in advance,
    David
    Last edited by David Lu; 08 May 2019, 07:50.

  • #2
    I trust that you have a time variable too, in which case ipolate surely applies. People get older at the rate of 1 year per year, which is wonderfully linear.

    Comment


    • #3
      Originally posted by Nick Cox View Post
      I trust that you have a time variable too, in which case ipolate surely applies. People get older at the rate of 1 year per year, which is wonderfully linear.

      Hi Nick,

      Thanks for your reply. -ipolate- works but there are still some missing values cannot be filled. here is an example:
      Click image for larger version

Name:	1.png
Views:	1
Size:	5.3 KB
ID:	1497312


      the command is
      bysort individual: ipolate age year, gen(agen)

      what's wrong with it?

      Thanks,
      David

      Comment


      • #4
        You want to extrapolate too, and you have to specify that with the epolate option, which is documented in the help.

        Comment

        Working...
        X