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

Re: st: SPSS to Stata issues


From   Christian Holz <statalist@krueschan.de>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: SPSS to Stata issues
Date   Mon, 15 Aug 2005 21:06:42 +0100

Hello,
actually, there IS a (much) more easy way. Below a quote from the Stat/Transfer 7 helpfile. The feature actually works correctly.
Best regards,
Christian Holz

"Automatic Dropping of Constants from the Output File

You can tell Stat/Transfer to automatically drop variables that are constant or missing for a selected subset of data. You select this option by checking the Drop Constants check box and then pressing the Optimize button.
This feature is useful when the part of a data set selected for transfer contains variables with values that are either constant or missing (such as a pregnancy variable when only male subjects are selected or variables in yearly surveys where the same questions do not appear for each year.)
This feature is not likely to be used often, but is extremely valuable when it is needed, since if the data set has a large number of variables, it can be exceedingly tedious to select only the meaningful ones manually."



Richard Williams wrote:

At 01:52 PM 8/15/2005 -0400, Eric Uslaner wrote:

Hi,

I have a huge data set (actually the General Social Survey early
release for 2004 that includes the entire GSS).  The GSS data set is in
SPSS and has almost 5000 variables, most of which are only asked in a
few years.  I am working with regular (intercooled) Stata 9 and do not
have SE.  I have truncated the data set in SPSS but the data set still
has the same number of variables, most of which will be entirely missing
data.  Can't use StatTransfer easily since this would require looking at
each variable and dropping those all missing one by one.  If I had Stata
SE, I could use Nick Cox's dropmiss to get rid of variables with no
valid cases.  But my problem now is that I can't get the data into Stata
at all (too many variables).  Is there a way to get rid of these null
variables in SPSS before I use StatTransfer?

There is probably an easier way, but how about using SPSS to create two smaller data sets of 2,500 vars each (or whatever works), convert to Stata, use -dropmiss-, and then merge your files back together?

-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: Richard.A.Williams.5@ND.Edu
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc

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

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index