documenting dataset

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

documenting dataset

Kristin Brown
I'm working with a large dataset (aprox 1500 variables) in SPSS17 and am trying to figure out the best way to export (preferably to Excel) a data dictionary/codebook so that non-SPSS users will be able to use it.  I'm hoping someone on the list has done something similar and can at least point me in the right direction. I actually have what I consider two different but related problems, but I'm guessing that someone who has done one might have done the other.
 
These are the elements I'd like to be in there: Variable name, position, label, measurement level, value labels (with values). I would also like to be able to add two things: variable source (i.e. the collection form, we have eight) and a description. I'd like it to be structured as a table with each variable having it's own row. With 1500 variables I can't make it by hand, at least not entirely.
 
Question 1 (the additional elements): I've experimented with using the pull-down for 'Custom Attributes' but it doesn't produce any syntax, so I would have to type each one individually even through I have a lot of elements (e.g. heart rate) which were collected on each of the forms.
 
Question 2 (creating the dictionary): Aside from the 'Custom Attributes' components, how do I export this to something that is useful. When I use the pull-down for "Codebook", I have no options for controlling the way it displays the information and each variable has it's own 'table' with two columns. The "DISPLAY DICTIONARY" syntax give me Variable Information in one table and Variable Values in another and, from what I can tell, has few options for excluding unwanted information.
 
Any ideas? Do I need to go learn Python this weekend? :o) I'm guessing so and I'm game, but I don't have a programming background and right now I don't really have a sense of what I need to tell SPSS to do (i.e. manipulating the layout of a table it already produces vs. producing it without Codebook or Dictionary).
 
Thanks in advance for your help.
 
Kristin
Reply | Threaded
Open this post in threaded view
|

Re: documenting dataset

Bruce Weaver
Administrator
Kristin Brown wrote
I'm working with a large dataset (aprox 1500 variables) in SPSS17 and am
trying to figure out the best way to export (preferably to Excel) a data
dictionary/codebook so that non-SPSS users will be able to use it.  I'm
hoping someone on the list has done something similar and can at least point
me in the right direction. I actually have what I consider two different but
related problems, but I'm guessing that someone who has done one might have
done the other.

These are the elements I'd like to be in there: Variable name, position,
label, measurement level, value labels (with values). I would also like to
be able to add two things: variable source (i.e. the collection form, we
have eight) and a description. I'd like it to be structured as a table with
each variable having it's own row. With 1500 variables I can't make it by
hand, at least not entirely.

Question 1 (the additional elements): I've experimented with using the
pull-down for 'Custom Attributes' but it doesn't produce any syntax, so I
would have to type each one individually even through I have a lot of
elements (e.g. heart rate) which were collected on each of the forms.

Question 2 (creating the dictionary): Aside from the 'Custom Attributes'
components, how do I export this to something that is useful. When I use the
pull-down for "Codebook", I have no options for controlling the way it
displays the information and each variable has it's own 'table' with two
columns. The "DISPLAY DICTIONARY" syntax give me Variable Information in one
table and Variable Values in another and, from what I can tell, has few
options for excluding unwanted information.

Any ideas? Do I need to go learn Python this weekend? :o) I'm guessing so
and I'm game, but I don't have a programming background and right
now I don't really have a sense of what I need to tell SPSS to do (i.e.
manipulating the layout of a table it already produces vs. producing it
without Codebook or Dictionary).

Thanks in advance for your help.

Kristin
There was some discussion of this problem in comp.soft-sys.stat.spss a few years ago.  You can find one of the threads by going to http://groups.google.com/group/comp.soft-sys.stat.spss/topics, and searching "this group" for <Display dictionary command>.  The solution I proposed there was using OMS to send the output from Display Dictionary to a couple of files, then doing a big of data management and merging them to produce a data dictionary like one used to get in older versions.

--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: documenting dataset

Brian Moore-7
Ruben van den Berg provided a solution to part of your problem a few
weeks back for me that works for version 15.  Just change the path in
the save translate at the end and you can export what you see in
variable view.

HTH,
Brian



* OMS.
DATASET DECLARE Variab.
OMS
/SELECT TABLES
/IF COMMANDS = ["File Information"]
SUBTYPES = ["Variable Information"]
/DESTINATION FORMAT = SAV NUMBERED = TableNumber_
OUTFILE = Variab
VIEWER=NO
/TAG = "Variab".

DISP VAR.

OMSEND TAG= ['Variab'].

DATAS ACT Variab.

REN VAR Var1=Variable_name.

DEL VAR TableNumber_ Command_ Subtype_ Label_.

SOR CAS by LABEL.


SAVE TRANSLATE OUTFILE='H:\Strategy, Marketing and Market
Research\Marketing Research\2009\Survey - Conference'+
 ' Evaluation\OVERALL\OMS Export of var names_labels.xls'
  /TYPE=XLS /VERSION=8 /MAP /REPLACE /FIELDNAMES
  /CELLS=VALUES .



-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Bruce Weaver
Sent: Thursday, June 25, 2009 11:06 AM
To: [hidden email]
Subject: Re: documenting dataset

Kristin Brown wrote:
>
> I'm working with a large dataset (aprox 1500 variables) in SPSS17 and
am
> trying to figure out the best way to export (preferably to Excel) a
data
> dictionary/codebook so that non-SPSS users will be able to use it.
I'm
> hoping someone on the list has done something similar and can at least
> point
> me in the right direction. I actually have what I consider two
different
> but
> related problems, but I'm guessing that someone who has done one might
> have
> done the other.
>
> These are the elements I'd like to be in there: Variable name,
position,
> label, measurement level, value labels (with values). I would also
like to
> be able to add two things: variable source (i.e. the collection form,
we
> have eight) and a description. I'd like it to be structured as a table
> with
> each variable having it's own row. With 1500 variables I can't make it
by
> hand, at least not entirely.
>
> Question 1 (the additional elements): I've experimented with using the
> pull-down for 'Custom Attributes' but it doesn't produce any syntax,
so I
> would have to type each one individually even through I have a lot of
> elements (e.g. heart rate) which were collected on each of the forms.
>
> Question 2 (creating the dictionary): Aside from the 'Custom
Attributes'
> components, how do I export this to something that is useful. When I
use
> the
> pull-down for "Codebook", I have no options for controlling the way it
> displays the information and each variable has it's own 'table' with
two
> columns. The "DISPLAY DICTIONARY" syntax give me Variable Information
in
> one
> table and Variable Values in another and, from what I can tell, has
few
> options for excluding unwanted information.
>
> Any ideas? Do I need to go learn Python this weekend? :o) I'm guessing
so
> and I'm game, but I don't have a programming background and right
> now I don't really have a sense of what I need to tell SPSS to do
(i.e.
> manipulating the layout of a table it already produces vs. producing
it
> without Codebook or Dictionary).
>
> Thanks in advance for your help.
>
> Kristin
>
>

There was some discussion of this problem in comp.soft-sys.stat.spss a
few
years ago.  You can find one of the threads by going to
http://groups.google.com/group/comp.soft-sys.stat.spss/topics, and
searching
"this group" for <Display dictionary command>.  The solution I proposed
there was using OMS to send the output from Display Dictionary to a
couple
of files, then doing a big of data management and merging them to
produce a
data dictionary like one used to get in older versions.



-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/
"When all else fails, RTFM."

--
View this message in context:
http://www.nabble.com/documenting-dataset-tp24207032p24208294.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD