Hi all,
I am working on an unbalanced panel data and I would like to create a variable called "numanswer" that gives the number of answers per ids.
Here is an example of what would look like the variable "numanswer" on an unbalanced panel data.
input byte id int year byte wage numanswer
1 2012 35 4
1 2013 30 4
1 2014 30 4
1 2015 34 4
2 2013 35 2
2 2014 50 2
3 2012 50 3
3 2014 40 3
3 2015 40 3
4 2015 30 1
5 2013 40 3
5 2014 40 3
5 2015 50 3
end
Does someone know how to create such a variable ?
Thanks a lot !
Regards,
Al
I am working on an unbalanced panel data and I would like to create a variable called "numanswer" that gives the number of answers per ids.
Here is an example of what would look like the variable "numanswer" on an unbalanced panel data.
input byte id int year byte wage numanswer
1 2012 35 4
1 2013 30 4
1 2014 30 4
1 2015 34 4
2 2013 35 2
2 2014 50 2
3 2012 50 3
3 2014 40 3
3 2015 40 3
4 2015 30 1
5 2013 40 3
5 2014 40 3
5 2015 50 3
end
Does someone know how to create such a variable ?
Thanks a lot !
Regards,
Al
Comment