Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: variable in red


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: variable in red
Date   Fri, 7 Mar 2008 12:24:14 +0000 (GMT)

--- In�s Rodr�guez <[email protected]> wrote:
> > What mean when a variable appears in red?

--- Chiara Mussida <[email protected]> wrote:
> if it is red into the data editor it means that it is considered as
> "string" variable and stata does not allow any regression with
> variable expressed in this way

Strings are basically letters, and Stata can do very little math with
letters (how much is a + b?), which is why you cannot directly enter a
string variable into for instance -regress-, as Chiara noted. However,
a string variable often identifies different groups, i.e. represents a
categorical variable. If this is the case you can use it in regression
by using the -xi- prefix. Alternatively you can turn it into a numeric
variable (give each category a number, and attach a the string to it
using a value label) using -encode-.

Hope this helps,
Maarten


-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      __________________________________________________________
Sent from Yahoo! Mail.
The World's Favourite Email http://uk.docs.yahoo.com/nowyoucan.html
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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