Statalist


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

st: tsline if tin error


From   Ana Gabriela Guerrero Serdan <ag_guerreroserdan@yahoo.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: tsline if tin error
Date   Sat, 13 Jun 2009 05:06:01 -0700 (PDT)

Dear Statalist, 

I am doing some tsline graphs and I get an error with the "if tin" option. 


I have data staring in March 2003 and runs for five years. When I do a graph with twoway tsline, the X axis starts with Jan 2003 and ends in Jan 2008 even if there are no observations. I tried to use the if tin but I get an error message. Can anyone let me know how to modify dates so the X axis starts from Mar 2003 and goes until Mar 2008 as my data suggests? 


. tsset mdate mdate, format(%tmMon_CCYY)
       panel variable:  mdate (weakly balanced)
        time variable:  mdate, Mar 2003 to Mar 2008
                delta:  1 month
tab mdate

      mdate |      Freq.     Percent        Cum.
------------+-----------------------------------
   Mar 2003 |          1        1.64        1.64
   Apr 2003 |          1        1.64        3.28
   May 2003 |          1        1.64        4.92
   etc...
   etc......
   Jan 2008 |          1        1.64       96.72
   Feb 2008 |          1        1.64       98.36
   Mar 2008 |          1        1.64      100.00
------------+-----------------------------------
      Total |         61      100.00



. twoway (tsline Women) (tsline Men) (tsline child), title(Women Children and Men,size(small)) note(Source: IBC , size(vsmall))  if tin(Mar 2003, Mar 2008)

option if not allowed
r(198);


thanks in advance, 
Gaby





----------------------------
Gaby Guerrero Serdán 

Department of Economics
Royal Holloway, University of London
TW20 OEX
Egham, Surrey
England, UK
http://www.rhul.ac.uk/Economics/For-Staff/postgrads.html



      

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