Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: string variable question


From   "Data Analytics Corp." <[email protected]>
To   [email protected]
Subject   st: string variable question
Date   Mon, 29 Mar 2010 09:32:06 -0400

Hi,

I have two numeric variables in a Stata dataset: A1 and A2. Each has 26 elements. I want to create a third variable, brand, as part of a do program that has 26 brand names. I tried

gen str brand = "A" "B" and so on to "Z"

but that didn't work.  How can I create a brand variable?

Thanks,

Walt



--
________________________

Walter R. Paczkowski, Ph.D.
Data Analytics Corp.
44 Hamilton Lane
Plainsboro, NJ 08536
________________________
(V) 609-936-8999
(F) 609-936-3733
[email protected]
www.dataanalyticscorp.com

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index