[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Kallimanis, Bellinda" <bkallimanis@fmhi.usf.edu> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: transferring data from SPSS to STATA |

Date |
Wed, 26 Oct 2005 08:36:17 -0400 |

Have you tried saving the file as a tab delimited (.dat) file and then using -insheet- in Stata? I don't have access to Stat Transfer and this is how I do it. The only problem I encounter is that if a variable has a lot of missing data and is in string format, so as these variables aren't much use to me I remove them and I have no problems and I too work with large datasets with many cases and variables. -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Joseph Coveney Sent: Wednesday, October 26, 2005 2:59 AM To: Statalist Subject: Re: st: transferring data from SPSS to STATA Alonso Sánchez wrote: About a year ago someone on the list posted a message regarding problems transfering an SPSS data file to a Stata file (version 8) using Stata Transfer. I now have the same problem with several data files, which have around 1,000 variables (both string and numeric) and over 120,000 cases. I've looked at the statalist (and my data files) archives, but still can't find a way around the problem. The transfer process stops at around the 66,000th case with the message "Invalid floating point operation." I believe this to be a systematic problem with one or more of the variables. Has anybody encountered a similar problem and would know how to find the problem variables? -------------------------------------------------------------------------------- That's a lot of variables to be sifting through. How about the following? Try transferring a single observation. If that's possible, then you'll have the list of 1000 variable names in Stata. You can then have Stata do the walking through the varlist in a foreach loop that feeds each variable, in turn, to a Stat/Transfer command processor batch file. (Don't use operating system mode, which doesn't allow for selecting variables). Then run the batch file and wait until Stat/Transfer balks. When it does, then you'll have the first troublesome variable identified. Joseph Coveney program define stattransferem capture log close quietly log using stattransferem.stc, text foreach var of varlist _all { display "KEEP `var'" display "COPY MySPSSFile.sav MySPSSFile.dta /Y /Q" } display "Quit" quietly log close end stattransferem stcmd stattransferem.stc exit * * 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/

- Prev by Date:
**RE: st: Numerous t-tests** - Next by Date:
**st: Sample size calculation** - Previous by thread:
**Re: st: transferring data from SPSS to STATA** - Next by thread:
**RE: st: transferring data from SPSS to STATA** - Index(es):

© Copyright 1996–2015 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |