Dear Stata users,
I use -retainlbl- command worte by Mead Over. When I try to run it on collapse, it failed. And the error suggests that command parse_collapse_clist is unrecognized. I searched in my computer and web, nothing found. The helpfile of -retainlbl- said that the it is UNDER CONSTRUCTION (I have noticed that the grammer in retainlbl's official example is wrongly specified). But I want to know what is parse_collapse_clist? (Stata 16 in use.) Thank you.
I use -retainlbl- command worte by Mead Over. When I try to run it on collapse, it failed. And the error suggests that command parse_collapse_clist is unrecognized. I searched in my computer and web, nothing found. The helpfile of -retainlbl- said that the it is UNDER CONSTRUCTION (I have noticed that the grammer in retainlbl's official example is wrongly specified). But I want to know what is parse_collapse_clist? (Stata 16 in use.) Thank you.
Code:
package retainlbl from http://digital.cgdev.org/doc/stata/MO/Misc ----------------------------------------------------------------------------------------------------------------- TITLE `retainlbl'. Restores variable labels after, e.g., collapse DESCRIPTION/AUTHOR(S) Some STATA operations, such as the collapse and reshapecommands, alter or destroy variable labels during execution. retainlbl stores the labels of a list of variables in macros and then restores them after execution of the label-destroying command. by Mead Over, Center for Global Development http://www.cgdev.org/expert/mead-over Requires Stata Version 14.2 or later Version 3.3 23Feb2025 Distribution-Date: 20250223 INSTALLATION FILES (click here to install) retainlbl.ado retainlbl_reshape_sub.ado retainlbl.sthlp ANCILLARY FILES (click here to get) retainlbl_example.do
Code:
. webuse college, clear
. list
gpa hour year number
-
1. 3.2 30 1 3
2. 3.5 34 1 2
3. 2.8 28 1 9
4. 2.1 30 1 4
5. 3.8 29 2 3
-
6. 2.5 30 2 4
7. 2.9 35 2 5
8. 3.7 30 3 4
9. 2.2 35 3 2
10. 3.3 33 3 3
-
11. 3.4 32 4 5
12. 2.9 31 4 2
. describe
Contains data from https://www.stata-press.com/data/r16/college.dta
obs: 12
vars: 4 3 Jan 2018 12:05
storage display value
variable name type format label variable label
gpa float %9.0g gpa for this year
hour int %9.0g Total academic hours
year int %9.0g 1 = freshman, 2 = sophomore, 3 = junior, 4 =
senior
number int %9.0g number of students
Sorted by: year
. retainlbl gpa hour year, store
Beginning with version 3.0, syntax is:
retainlbl (collapsereshape) [varlist] , (storerestore) [options]
Here, instead of -collapse- or -reshape-, the subcommand is -gpa-.
r(198);
. retainlbl collapse gpa hour year, store
command parse_collapse_clist is unrecognized
r(199);
. which retainlbl
c:\ado\plus\r\retainlbl.ado
*! version 3.3 23Feb2025 by Mead Over UNDER CONSTRUCTION

Comment