rename ($oldname ) ($newname )变量名写错了,认真检查下rename (old name new name)顺序别搞错了。
Dear Stata users, I have the following problem with renaming variables: I would like to rename variables from v2 to v58 with only one name, which is year. I know that I can use the renvars command, but if I type renvars v2-v58 \ year I get the following error message: lists of ...
Hi Statalisters, I want to rename all my variables (in lots of datasets) except the first variable which is idnr. The problem with the syntax below is that "if is not allowed". Someone have a solution to this? /Tomas levelsof atc , local(cat) foreach k of local cat { preserve use...
*将变量名中带有的jan都删除,无论是在前缀,后缀还是中间 *例如,janstat重命名为stat,injanstat重命名为instat,subjan重命名为sub rename *jan* ** *将变量名中以jan开头,并含有s的变量重命名为去除jan并以1结尾 *例如,janstat重命名为stat1,janest重命名为est1,但janinc不会变为inc1 rename jan*s* *s...
在目前工作中,用stata清洗及分析数据,感觉很顺滑。无奈不少同学因为help文件里的英文望而却步。 带着学习和分享的目的,根据工作经验,给大家整理一些常用以及不太常用但很有用的命令,并对该命令的help文件进行有侧重的详解。 2. 命令及获取 rename group:批量重命名变量名,系统自带命令。(命令还是rename) ...
From"Airey, David C" <david.airey@vanderbilt.edu> To"statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> Subjectst: rename DateTue, 7 Aug 2012 12:27:13 -0500 Follow-Ups: Re: st: rename From:Nick Cox <njcoxstata@gmail.com>...
The ds, has(vallabel) is also good to know because initially when if was using "foreach var of varlist _all { " to loop through the variables and was consequently creating labels on variables such as ID or weight which did not initially have labels. On Sun, May 16, 2010 at 7:40 ...
Stata variables into Mata and vice versa Increase the number of observations in a dataset Rename groups of variables Create separate variables Temporarily invoke operating system Save and restore data snapshots Split string variables into parts Manage variable lists Create and modify user-defined variable...
When we merge the web dataset to the large dataset (merge webdata using largedata) we get a note from Stata that ?Label already exist Q1? (for a number of variables). -describe- tell us that variables in the web-dataset have new variable names but that the value-labels is associated ...
but most seem to be going the other way (i.e from renaming >>> variables to match the label names) >>> >>> Thanks heaps >>> Anna >>> >>> * >>> * For searches and help try: >>> * http://www.stata.com/help.cgi?search >>> * http://www.stata.com/support/statalist/...