Announcement

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

  • Copy values to the group

    Hi There,

    I am new to STATA and this is my first post here. Excited to be here.
    I have a question on copying a value to missing values of the group.
    Below is the illustrative problem I have. How do I copy the value for all of the fields of a group. e.g. I want to copy 1 for all of value cells of group 1 and so on for the rest of the groups.
    Can anyone help me here with STATA code?

    Thanks
    Karthik
    ID Year Value
    1 2004 1
    1 2005 .
    1 2006 .
    1 2007 1
    1 2008 1
    1 2009 1
    1 2010 .
    1 2011 .
    2 2004 0
    2 2005 0
    2 2006 0
    2 2007 0
    2 2008 .
    2 2009 .
    3 2004 1
    3 2005 1
    3 2006 .
    3 2007 .
    3 2008 .
    3 2009 .


  • #3
    Dear Mr. Cox,

    Apologies for my ignorance on using wrong language. Henceforth I will use Stata.

    Thank you
    Karthik

    Comment


    • #4
      The Statalist post on mipolate should also be of help.

      Comment


      • #5
        Thank you Mr. Cox. I will look in to it. Appreciate your help.

        Comment

        Working...
        X