<>
Re the first question: You can at least get your hands on several pieces of
information regarding the time-series setup of your data by simply repeating
-tsset- w/o arguments.
*************
webuse sunspot, clear
tsset time, yearly
quietly tsset
return list
*************
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Ulrich Kohler
Gesendet: Freitag, 17. Juli 2009 09:10
An: [email protected]
Betreff: Re: st: Simple questions regarding time series data
<>
Others might be better prepared for answering your question 1. Meanwhile
I have answers to the others:
Am Freitag, den 17.07.2009, 10:17 +0800 schrieb Shruthi JAYARAM:
> 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.
...
> 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)
. gen outputstring = "The forcast GDP for 2009 is " + string(y)
see -help operators- and -help string functions-.
> 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?
It is just the same:
. display x[1]
displays the frist value in variable x. You can also put expressions
inside the brackets:
. display x[int(_N/2)+1)]
See -help exp- for what Stata (not: STATA) means by "expression".
> 4. Finally, is it possible to invoke the system command line from within
> STATA to run an outside program during the STATA proceses?
See
. help shell
Hope this helps
Uli
--
[email protected]
030 25491-361
*
* 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/