第一个字符 不能是汉字, 所以后续许多操作无法进行。检验还是先在excel里面改成字母,然后在在stata中运行
看stata中的命名规则
Title
varname (from [U] 11.4 varlists)
Description
A varname is one variable name, such as
x
myvar
Myvar
inc92
ausl渀搀椀猀挀栀
reciprocal_of_miles_per_gallon
_odd
_1994
When we use the term varname, we usually mean an existing varname -- a variable that
already exists in the dataset. The alternative would be a newvar.
When referring to an existing varname, we can abbreviate -- use only some of the leading
characters -- as long as we specify enough to uniquely identify the variable:
Myv might be a unique abbreviation for Myvar.
reciprocal might be a unique abbreviation for reciprocal_of_miles_per_gallon.
Sometimes we can use the full varlist notation, but it must identify one variable:
my*r might uniquely identify myvar
r*gallon might uniquely identify reciprocal_of_miles_per_gallon.
In the varlist notation, * means that zero or more characters go here.
Varnames are often specified inside options, and then sometimes the varlist notation is
allowed and sometimes it is not. Abbreviations are always allowed, however, assuming
that you have not turned them off; see set varabbrev.
Note that variable names may be 1 to 32 Unicode characters long and must start with a
Unicode letter or _, and the remaining characters may be Unicode letters, _, or Unicode
number digits. Examples of Unicode letters are "a", "Z", and "é"; examples of Unicode
digits are 0, 1, and 9.
The formal definition of a Unicode letter is a Unicode character for which uisletter()
returns 1. A Unicode digit is a Unicode character for which uisdigit() returns 1.
An invalid UTF-8 sequence is allowed in the variable name and is counted as one
character. This is mainly for backward compatibility reasons. For example, capital
letter "E" with a grave accent is encoded as char(200) in ISO-Latin-1 encoding, which
may appear in variable names of older versions of Stata, but char(200) alone is an
invalid UTF-8 sequence. See [U] 12.4.2.6 Advice for users of Stata before version 14
for details.
|