Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Dates displaying as SIF rather than HIF on graphs...


From   Peter Pressman <[email protected]>
To   [email protected]
Subject   st: Dates displaying as SIF rather than HIF on graphs...
Date   Fri, 20 Dec 2013 07:18:06 -0800

I'm new to Stata, and suspect there's an easy answer to this, but can't
find one that's quite what I need online despite a couple hours of reading.

Briefly, I'm trying to graph the results of a mixed effects model that
compares brain volumes within subjects over time.  This means that for each
time, each subject number (PIDN) is associated with at least two volumes of
interest.

The Date variable is taken directly from an Excel sheet.  In Data Browser,
the dates display as, for example, 1/1/2010.  When I describe the variable,
it's in integer format, with display type %td.

I run the mixed effects models as follows:

*xtset PIDN Date*

*xtmixed Volume1 Date|| PIDN:*

*xtmixed Volume2 Date|| PIDN:*

Having obtained my results, I try to get something of a graphic
representation.

*tsset LinkID Date, daily*

*label variable Date "date"*

*graph twoway (lfitc Volume1 Date)(lfitci Volume2 Date)(connected Volume1
Date, connect(L))(connected Volume 2 Date, connect(L)), name
(FS5_combinedlong) ///*
*graph save "FS5_combined_long.gph", replace ///*

I can produce graphs without using tsset, but am including it here because
it seems necessary to manipulate date formatting based on what I've read.

I am using the variable LinkID in the tsset because this is a variable that
uniquelyidentifies each observation.  It is the only way I've found to avoid
the "repeated time values" error.  Perhaps this is where the trouble lies?

In any route, subsequently trying to use the format command on dates has
not worked.  Every time I graph, I get ugly SIF on my x-axis, with no clear
way to change it.

All I want is the opportunity to display dates in MDY format on the x-axis.
 How do I make this happen?   Thank you!
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index