Statalist


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

st: RE: Personal ado. files


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Personal ado. files
Date   Tue, 5 Aug 2008 17:57:50 +0100

I am not clear what your question is, but you are quoting from a FAQ labelled 

"Note: This FAQ is relevant for users of releases prior to Stata 8."

Unless you are using Stata 7 or earlier, 

1. There is no reason I can think of why you should write your own program for displaying frequency distributions. If official commands do not suit, there are several others. 

2. -histogram- with appropriate options can do what this program does, and much, much more. 

Nick
n.j.cox@durham.ac.uk 

Katia Bobulova

I am trying to make a frequency plot of my variables.

I have found good suggestions on the Web, however I don't have
understood very well how to program and how to create my personal ado.
file in Stata.

I have found this example to create an ado file, in the Stata FAQ
section: http://www.stata.com/support/faqs/graphics/freqplot.html

-----------------------------------------freqplot.ado
        program define freqplot
        	version 7.0
        	syntax varlist(max=1)
        	tempvar
        	qui egen `y' = group(`varlist')
        	qui sum `y'
        	local x = int(r(max)) - int(r(min)) + 1
        	graph `varlist', histogram freq bin(`x')
        end
        -----------------------------------------freqplot.ado

However, I don't know how to reproduce it by myself.

Could you please explain me how to do?

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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