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
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 | . |
Comment