[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: RE: displaying summary statistics of date variables
> > Is there a way to display summary statistics of (elapsed)
> > date variables
> > in date format? For example, summary of the following
> date variable
> > produces output which is difficult to interpret: What, for
> > example, is the
> > latest date in variable "date"? 15337 is difficult to interpret.
> > I have checked the manuals, the web site, and the list
> > archives to no avail.
> > summ date
> > Variable | Obs Mean Std. Dev. Min
> > date | 317462 12376.24 1809.816 9000
> Nick Cox has probably already written something for this (-:
> However, the following is a quick and dirty program that'll
> do it. It
> could be made into a more general wrapper that detects the display
> format of the variable, and only displays as dates the stats for
> date-formatted variables, etc etc.
> program define sumdate
> version 8
< snip >
> you may want to try this as well.
> datesum from http://fmwww.bc.edu/RePEc/bocode/d
> 'DATESUM': module to display summary statistics for date
> datesum displays summary distribution statistics for date /
> date display format. / Author: Gary Longton, Fred Hutchinson
> Research Center / Support: email firstname.lastname@example.org /
Or -summdate- from SSC.
To -summarize- the thread so far:
1. Nick Winter posted code -sumdate-, which requires Stata 8.
2. Gary Longton has -datesum- on SSC, which requires Stata 7.
3. There is an older -summdate- (N.B. spelling) on SSC, which
requires Stata 6.
Something there for almost everybody --
but in addition to these user-written programs, what is easily
is that official Stata's -codebook- acts smartly given a date format,
so check it out
first. In fact, I'm hereby suggesting that this deserves an index
entry in the
Stata 9 manuals, which won't be issued for a while yet, and an entry
.key files which -search- searches, which could be done very quickly.
* For searches and help try: