<snip>
*-------------- begin example -----------
clear
input Id week class str1 treatment
1 0 2 a
1 8 3 a
1 12 3 a
2 0 3 b
2 8 3 b
2 12 4 b
3 0 3 a
3 8 3 a
3 12 2 a
end
reshape wide class , i(Id) j(week)
list, clean
tab treatment class12 if class0 == 3
*------------ end example --------------
<snip>
Worked a dream, many thanks.
Richard
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/