Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: How to use catplot to display the time variable in date format


From   A Loumiotis <antonis.loumiotis@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: How to use catplot to display the time variable in date format
Date   Wed, 23 Jun 2010 11:38:58 +0300

Dear all,

How can I modify the catplot command to display the time variable in
date format and not as numeric format?

For example I'm using an example that Nick Cox has provided with a
small modification to format the time variable as quarters:

 . set obs 1000

 . egen id = seq(), block(10)

 . egen time = seq(), to(10)

 . format time %tq

 . gen response = ceil(3 * runiform())

 . catplot response time, percent(time) recast(bar) asyvars stack


But the catplot command above does not display the time variable in
quarter format even though it has such format.

Thanks,
Antonis Loumiotis
*
*   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   |   Site index