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

st: -nicedates- available from SSC


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: -nicedates- available from SSC
Date   Wed, 10 Sep 2003 16:21:30 +0100

Thanks to Kit Baum, a new package -nicedates- for Stata 8.1
may now be installed from SSC.

-nicedates- capitalises on the -_tsnatscale- command added to
official Stata on 9 Sept 2003, which makes it easier to get
a list of "nice" dates. The underlying problem is explained at

How can I get "nice" date labels on a graph?
http://www.stata.com/support/faqs/graphics/nicedate.html

(which in terms of solutions is already out-dated, despite the fact
that
I revised it a week ago).

An example will be enough.

Suppose you

. webuse wpi1
. line wpi t

What is labelled by default on the time axis is every 50th
observation, which makes sense, except insofar as these are
quarterly dates and dates every 12.5 years look odd, despite
being even.

. nicedates t

looks at the display format of t and calls up -_tsnatscale-
to get a smarter guess, which is left behind in r(dates),
so you then can

. line wpi t, xla(`r(dates)')

There are a few more wrinkles, but that's the main story.

(No, this will not solve your (lack of) partner problem.)

Nick
[email protected]

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