I am posting this to the list because this is something I have see come
up many times over the years.
About 1980, SPSS put the MULT RESPONSE procedure in. In does frequencies
and crosstabs for sets of multiple responses (MR) (like what you
describe) and for sets of multiple dichotomies (MD). The MD sets of
variables frequently arise from "check all that apply" questions. SPSS
can crosstab sets by other sets or by several categorical variables.
Their TABLES procedure has long handled MR and MD and in the latest
version, they have extended the many things that can be done with them.
If you just want a frequency and you have all long (gt 8 characters)
string variables see a syntax example which you could adapt at:
http://pages.infinit.net/rlevesqu/Syntax/ChartsTables/FindPopulationFrequencyWhenMultipleResponseWithLongStrings.txt
I you want more than a single MR frequency count, this would supply the
info you need to set up the same codes for the same drugs in each of the
variables. When you set up your coding be careful about slight
variations in spelling, punctuation, spacing in the strings. Using the
/PRINT specification will show the recode details.
You are lucky to be able to prepare your data so quickly. In 30 years
of consulting I would subjectively estimate that data entry, cleaning,
documentation, prep, exploration, etc., typically takes 80 to 95 percent
of the staff time involved.
Hope this helps.
Art
[log in to unmask]
Social Research Consultants
University Park, MD USA
(301) 864-5570
Stephen W Kay wrote:
> Hi,
>
> I recently had a data manipulation problem I couldn't handle in any of my
> stats packages. In the end I had to program VBA routines in Excel to solve
> my problem. Whilst I enjoyed the challenge, I do wonder if I've
> underestimated the ability of stats packages in manipulating data.
> Accordingly could anyone please tell me if it is reasonably straight forward
> to solve the following data manipulation problem in routine packages (and if
> yes which package and what commands to use):
>
> I'm analysing patients on drugs. Patients can be on more than one
> drug. I have six variables, drugs1 through to drugs6 (i.e. a patient can be
> on at most 6 different drugs). Each of these six drug variables can hold any
> drug. I want to run a frequency count on the drug combinations patients are
> on. I cannot simply concatenate the six variables because the frequency
> analysis will not recognise that order is not important (i.e. it doesn't
> recognise "Drug A & Drug B" = "Drug B & Drug A"). I could concatenate and
> then run a sort routine on each concatenated value (thus putting them in the
> same order -
> but I don't think any stats package lets you do this?). Maybe there are
> other ways to accomplish my aim?
>
> Probably like a lot of people I spend as much time getting my data in the
> correct form as I do actually analysing it. Any help much appreciated.
>
> Cheers,
>
> Steve
>
> Stephen Kay
> Head of Statistics
>
> Adelphi Group Products
> www.adelphigroup.com
>
> Adelphi retains ownership of all data and fieldwork materials. In accordance
> with the company's Terms and Conditions, written prior approval must be
> obtained with regard to any use of the data in any items submitted for
> publication or for use in marketing materials.
>
|