Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: rearranging small sets of data and rows to columns
From
Doug Hess <[email protected]>
To
[email protected]
Subject
st: rearranging small sets of data and rows to columns
Date
Wed, 3 Aug 2011 09:33:29 -0400
Hi.
I am not sure if Stata is useful for doing the following and I'm not
even sure what the vocabulary is for discussing this sort of
rearranging of data. But here goes.
A government agency gave me data in the following format (in a text
file) and claims they cannot produce it any other way. Bringing it
into Stata (ver.11) was not hard, but now I need to rearrange it.
Each office essentially is its own set of rows and columns. The
columns are months and the rows are something like this (the question
rows are just simple counts of yeses to a yes/no question):
Office 1
Number of clients seen
Number refused survey
Question 1
Question 2
Question 3
Office 2
Number of clients seen
Number refused survey
Question 1
Question 2
Question 3
Etc. for ~60 offices
So I'd like to rearrange it with offices as rows (records) and the
columns as questions by month (with number of clients seen as "size"
and number refusing to take the survey as "refused"). So the variables
are: Jan11Size, Jan11Refuse, Jan11Q1 Jan11Q2...Feb11Size , Feb11Refuse
Feb11Q1, etc.
Thoughts on how to do this? And are there terms of art for what kind
of problem or method this is?
Thank you.
Doug
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/