Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: RE: defining selection criteria


From   "Richard Pitman" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: defining selection criteria
Date   Thu, 29 Mar 2007 10:44:03 +0100

<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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index