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

Re: st: About data transformation


From   Philippe Glaziou <[email protected]>
To   [email protected]
Subject   Re: st: About data transformation
Date   Fri, 14 Feb 2003 08:58:14 +0700

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?

-saveold- saves to a stata7 format, which is not what you will
want.

An option would be:

stata8> . outfile using filename, d

The following stata8 command will read the file:

stata8> . infile using filename, a

I think (I have not been using stata6 in a while) that the
corresponding stata6 command to read the file is:

stata6> . infix using filename

However, the first line of filename will need to be edited for
this to work:

------------top of filename------------------
	dictionary{


-----------top of filename2------------------
	infix dictionary{


That is only one Unix command away:

cat filename.dct | sed -e 's/dictionary/infix dictionary/'\
                   > filename2.dct 

stata6> . infix using filename2.dct


Sorry if this infix command does not work, I do not have any
stata6 for testing. It it does, the whole thing may be wrapped
into an ado file for your stata6 users' convenience. The unix
command should also work in MacOSX.

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