[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Re: Insheet question
At 09:46 27/02/04 -0500, Robin Newberry wrote:
Probably another dumb newbie question, but...
It looks as if you have a variable named "if". The Stata language has a
list of reserved words (including "if"), which cannot be used as variable
names, because Stata wants to use them for something else. The full list is
in Section 14.3 of the User's Guide (at least in Stata 7 and Stata 8).
I'm trying to read a tab delimited file into a Stata (Intercooled 8.2)
data set using insheet. It's fairly large (3800+ observations, 424
variables) and the first line contains the variable names. Without the
variable name line Stata reads it in fine, but with the variable name line
I get a
"if invalid varname
error in line 1 of file"
error message. I've looked at the variable names, but I don't see anything
obviously wrong, and the Stata help file doesn't say much about what
constitutes valid variable names, nor is the User's Guide overwhelmingly
informative on this issue. Anyone know what the maximum length for a
variable name is? Any other common pitfalls unique to Stata I should look for?
I hope this helps.
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Opinions expressed are those of the author, not the institution.
* For searches and help try: