Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: survey data: how does one generate category, scale, score counts?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: survey data: how does one generate category, scale, score counts?
Date   Mon, 8 Jul 2002 11:01:18 +0100

Carsten Baumann
>
> I am trying to summarize results from a survey with about 28,000
> participants.  What I am trying to do seems simple, however, I need help.
>  A former colleague of mine used to do similar work in SPSS using the
> AGGREGATE command and then OUTFILE with a BREAK by (sub)categories.  Any
> tips on how to do this are greatly appreciated.
>
> I am working with student survey results with the following variables:
>
> WTSKUL (value 0 to 2)
> BUILDING (value 20 to 8000)
> GRADE (value 6 to 12)
> SEX (value 1 to 2)
> ETHNICITY (value 101 to 109
> SCALE1
> SCALE2
> ...
> SCALE110
>
> The scales have values (or SCORES) from 0 to 8
>
>
> What I need is to generate a long file with a COUNT by BUILDING
> by CATEGORY
> (Grade, Sex, or Ethnicity) by SCORE for each SCALE.  That is, how many
> FEMALES (CATEGORY 1) in BUILDING == 20 received a SCORE == 1 on SCALE1.
>  For example:
>
> BUILDING 	CATEGORY	SCALE		SCORE		COUNT
> 20		1		SCALE1	1		458
> 20		1		SCALE1	2		657
> 20		2		SCALE1	1		20
> 20		101		SCALE1	1		54
> 20		109		SCALE1	4		333
>
> repeat with each SCALE
>
> repeat for each BUILDING
>
> The individual cases must be weighted using WTSKUL.
>

Ulrich Kohler has made one suggestion. Another
is to use -contract-. Actually, this is the
same suggestion, as -contract- is just
Ulrich's idea wrapped up as a single command.

You can weight with WTSKUL as long as that is an integer.

Nick
[email protected]

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