Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: length of a variable name

From   Nick Winter <>
Subject   Re: st: RE: length of a variable name
Date   Wed, 16 Jul 2003 13:09:39 -0400

I have had the exact same issue interfacing between Stata and SPSS--the dataset I was using had the full question text as the variable labels, which was truncated on transfer. And I experienced similar embarrassment, given my (very loudly and frequently expressed) attitude about SPSS.

Another issue has to do with SPSS's user-defined missing values. Stata now supports multiple missing values, but there is no clean way to turn the various user-missings for a variable in SPSS into Stata's .a, .b, etc.

One approach, which I've started working on but not finished, is to read the SPSS data dictionary direclty using -file-, and then use -note- to attach the full labels to the variables, and re-map the missing values. But that's ugly, messy, and difficult.

So I endorse the request for longer variable labels, at least in SE.

Nick Winter

From: Lee Sieswerda []

Sent: Tuesday, July 15, 2003 6:34 PM
To: Statalist (
Subject: st: length of a variable name

According to -help limits-, the maximum length of a variable name is 80
characters (I use Intercooled Stata 8, but the limit is the same in
Stata/SE). One would think that this would be enough. However, I have a
dataset in SPSS format wherein the variable labels are the full text of a
survey question. This often exceeds the 80 character limit. The longest
variable label in the dataset is 210 characters long.

I am working on this dataset with a number of other people, all of whom use
SPSS, which has a much higher limit. I much prefer Stata, so I always
convert the SPSS dataset to Stata format to work on it. However, the
80-character variable label limit means that when I convert back to SPSS
format and send the altered dataset back to my colleagues, the variable
labels are all truncated at 80 characters (embarassing, as I have been
proselytizing my benighted SPSS-using colleagues for some time). I could
work around this by re-labeling after I convert back to SPSS format, but
with a couple of hundred variables, this is a pain in the neck.

I wonder how much support there would be for increasing the variable label
limit to, say, 244 characters?

Lee Sieswerda
*   For searches and help try:
*   For searches and help try:
Nicholas Winter
Assistant Professor
Department of Government
Cornell University
* For searches and help try:

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