# Re: st: vectored data?

 From "Svend Juul" To Subject Re: st: vectored data? Date Mon, 3 Oct 2005 21:54:00 +0200

Steffen wrote:

I'm doing statistics on an animal experiment that I've just
finished. Tumor bearing mice were submitted to different
treatments ordered into treatment groups. Respons to
treatment was quantified by measuring tumor size daily,
however not in weekends. Tumor (implanted subqutaneously
in the foot) size was measured as length, breadth and
height, and the volume calculated as
length*hight*breadth*\pi/6. I haven't been able to find a
satisfactory way to enter this data into a Stata dta file.
I'd like to be able to enter a data point as a 3-d vector,
but I don't know how, since this isn't a data type. My
current solution is to enter each measurement as a text
string: "ll,hh,bb" and then extract each parameter when
needed. Is there a 'smarter' way?
-----
- and Nick and Maarten gave good advice. Here is some more elaboration.

You could keep your data in "wide" and "long" format, and you may switch between long and wide format using the -reshape- command. A long format might be useful, e.g. for graphing the tumor growth, a wide format for other purposes. Here is a long format:

mouse  treat time  length  height  breadth
1      1    1       1       2        1
1      1    2       2       2        2
1      1    3       3       2        2
...
2      3    1       1       1        2

The long format no doubt is most practical for entering your data, and for performing general calculations (e.g. tumor volume). In a long format you would not need Maarten's -forvalues- construct to calculate tumor volume for any mouse, at any time.

Hope this helps
Svend

________________________________________________________

Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000 Aarhus C,  Denmark
Phone, work:  +45 8942 6090
Phone, home:  +45 8693 7796
Fax:          +45 8613 1580
E-mail:       sj@soci.au.dk
_________________________________________________________

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