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

RE: st: Simple questions regarding time series data

From   "Nick Cox" <>
To   <>
Subject   RE: st: Simple questions regarding time series data
Date   Fri, 17 Jul 2009 11:53:32 +0100

This answered the question well. But note also that it is not necessary
and not usually a good idea to put a single text string in a variable. 

di "The forecast GDP for 2009 is " 

illustrates technique. Check out the help for -display-. 


Ulrich Kohler replied to Shruthi JAYARAM 

> 2. Is it possible to concatenate strings and numbers into a larger
> 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
> y)

. gen outputstring = "The forcast GDP for 2009 is " + string(y)

see -help operators- and -help string functions-.

*   For searches and help try:

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