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

Re: st: variable in red

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

--- Inés Rodríguez <> wrote:
> > What mean when a variable appears in red?

--- Chiara Mussida <> 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 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

Sent from Yahoo! Mail.
The World's Favourite Email
*   For searches and help try:

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