Statalist The Stata Listserver


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

st: Save results as a data file


From   "Fan, Shihe" <ShiheFan@cha.ab.ca>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Save results as a data file
Date   Fri, 15 Sep 2006 14:16:28 -0600

Hi, everyone,

As a new user, could any one show me how to save the results as a data
file so that I can reuse it. 

Say, I have  a variable (x) with many levels in a file. I want to get
the total count of each level in a file. 

The codes;

Sort x;
By x: count;


Will produce the results on the screen, but I want it in a file like:


X	N
1	5
2	10
.....



Thank you







Shihe Fan
Epidemiologist
Office of the MOH
Public Health Division
Suite 300, 10216 - 124 Street
Edmonton AB T5N 4A3		
Phone:(780) 413-7742
Fax: 	(780) 413-7950		
shihefan@cha.ab.ca

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