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

st: About data transformation


From   [email protected] (Shannon Driver, StataCorp)
To   [email protected]
Subject   st: About data transformation
Date   Thu, 13 Feb 2003 16:38:51 -0600

Vincent <[email protected]> wrote:

> I am a STATA 8 SE user. I would like to share my data
> set (*.dta) with people who use STATA 6.0, however,
> they told me that they could not open the data file. 
> STATA 6.0 says that it's not a stata data file.
> I am wondering if there is any solution for this?

In Stata 8, you can type 

	. saveold filename7
	
The -saveold- command will save your dataset so that it can be read by Stata 7.
However, Stata 6 will still not be able to read this.  But, if you have access
to Stata 7, you could then open the dataset you just created with Stata 7 and
type:

	. save filename6, old

This would convert the data from Stata 7 format to Stata 6 format.  The
-saveold- command replaced this command in Stata 8.  Going through this
two-step process would convert the data so that Stata 6 could read it.

The only other alternative I can think of would be to use the -outfile- or 
-outsheet- command to create an ASCII text file of the data.  You could then 
use -infile-, -infix-, or -insheet- to read the data into Stata 6.

In doing this, you might run into limit issues, such as length of variable 
names (Stata 6 had a limit of 8 characters and Stata 7 and 8 have limits of 32
characters), maximum number of variables, string lengths (Intercooled Stata 6
limited strings to 80 characters and Stata 7 SE and 8 SE limit them to 244
characters), etc.

In the end, the best solution might be to encourage your friends to upgrade to
Stata 8.

--Shannon Driver
  [email protected]

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