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]
Re: st: Re: converting string to numerals
From
Nick Cox <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: Re: converting string to numerals
Date
Sun, 5 Jan 2014 23:51:20 +0000
This is a reply to http://www.stata.com/statalist/archive/2013-11/msg00817.html
For other advice, follow the thread. In my view, just predefining
value labels and then using -encode- is the way to go. I have nothing
against the -egen- function cited here, as I wrote it, but -encode- is
the more natural solution.
Nick
[email protected]
On 5 January 2014 22:14, manon <[email protected]> wrote:
> I am new to Stata, so I may be wrong, but I think you could try downloading
> the "egenmore" package.
> I know the function " ntos(numvar) , from(numlist) to(list of string
> values)" would allow you to go from "-2", "-1" etc. to "strongly disagree,
> disagree" etc.
> You should look at the package in detail, and hopefully you'll find a
> function that allows you to do the reverse!
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/