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

From |
Shruthi JAYARAM <Shruthi_JAYARAM@mti.gov.sg> |

To |
statalist <statalist@hsphsun2.harvard.edu> |

Subject |
st: Simple questions regarding time series data |

Date |
Fri, 17 Jul 2009 10:17:00 +0800 |

Message Classification: Restricted Dear STATA listers, I have a few very simple questions regarding time series data manipulation - I'm relatively new to STATA (was using R before) and couldn't locate the answers in the help manual. 1. How do I extract the frequency of a time variable? For example, a query like frequency(x) should return 12 is x is a %tm variable and 365 if it's a %td variable. 2. Is it possible to concatenate strings and numbers into a larger string? For example, I have a variable y and I want to get the output "The forecasted GDP for 2009 is y". Can I write a command that intuitively carries out this: gen outputstring = paste("The forecast GDP for 2009 is", y) 3. If I have a time variable x that runs from 1990m1 to 1990m12, how do I extract the first observation? In R, variables are arrays or matrices, allowing you to specify the particular observation you would need, such as x[1] for the first observation of x. What is the equivalent in STATA? 4. Finally, is it possible to invoke the system command line from within STATA to run an outside program during the STATA proceses? I'd be very grateful for any help on any of these, thanks so much! Shruthi * * 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/

**Follow-Ups**:**Re: st: Simple questions regarding time series data***From:*Ulrich Kohler <kohler@wzb.eu>

- Prev by Date:
**RE: st: RE: RE: matsize** - Next by Date:
**Re: st: Plot after regression using linear splines - any way to add confidence intervals?** - Previous by thread:
**st: re: matsize** - Next by thread:
**Re: st: Simple questions regarding time series data** - Index(es):

© Copyright 1996–2017 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |