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

st: Re: help on outfile to fixed formatted text file


From   "Michael Blasnik" <michael.blasnik@verizon.net>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: help on outfile to fixed formatted text file
Date   Tue, 25 Oct 2005 12:36:21 -0400

----- Original Message ----- From: <pmitra@ups.com>
To: <statalist@hsphsun2.harvard.edu>
Sent: Tuesday, October 25, 2005 11:50 AM
Subject: st: help on outfile to fixed formatted text file



Hello List,
I'm using Stata8 on Windows XP.

I would like to export the stata output to a fixed formatted text file.
I think I need to use dictionary option with outfile but can't figure
out how to implement it. Can someone please help me?

For example, the variables that I want to write are: date state revenue
//(date is a date formatted float, state is 2 char string, and revenue
is float)

The output needs to look like:
04/09/05GA500.00 (where date is 04/09/05, state is GA and revenue is
500.00)
10/09/05NY700.00 (where date is 10/09/05, state is NY and revenue is
700.00)
and so on...

Thank you.

Sincerely,
Pinaki Mitra
You are on the right track with -outfile-, but not with a dictionary. Instead, use the runtogether option. You will most likely need to convert all numeric variables to strings with the desired formatting and may also need to pad strings. You can then order the variables and use the runtogether option in outfile.

Michael Blasnik
michael.blasnik@verizon.net
*
* 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