Statalist


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

Re: st: Re: tsline if tin error


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

Thanks Martin, I tried putting it before the comma but I get 

invalid syntax
r(198);


--- On Sat, 6/13/09, Martin Weiss <martin.weiss1@gmx.de> wrote:

> From: Martin Weiss <martin.weiss1@gmx.de>
> Subject: st: Re: tsline if tin error
> To: statalist@hsphsun2.harvard.edu
> Date: Saturday, June 13, 2009, 7:10 AM
> <>
> 
> Apart from any other problems in your code, the -if-
> statement always goes 
> before the comma separating the command from its
> options...
> 
>  twoway (tsline Women) (tsline Men)/*
> */ (tsline child) if tin(Mar 2003, Mar 2008),/*
> */ title(Women Children and Men,size(small)) /*
> */note(Source: IBC , size(vsmall))
> 
> 
> HTH
> Martin
> _______________________
> ----- Original Message ----- 
> From: "Ana Gabriela Guerrero Serdan" <ag_guerreroserdan@yahoo.com>
> To: <statalist@hsphsun2.harvard.edu>
> Sent: Saturday, June 13, 2009 2:06 PM
> Subject: st: tsline if tin error
> 
> 
> > 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/
> > 
> 
> *
> *   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/
> 


      

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