Gtools Macro Apr 2026

* Check if varlist provided if "`varlist'" == "" di as error "Error: varlist required" exit 198

* Determine new variable name if "`generate'" == "" & "`replace'" == "" local newvar = "`oldvar'_transformed" else if "`generate'" != "" local newvar = "`generate'" else if "`replace'" != "" local newvar = "`oldvar'" gtools macro

program define gtools_macro version 15 syntax [varlist] [if] [in] [, /// RECode(numlist) /// GENerate(string) /// LABel(string) /// CUTpoints(numlist) /// BINs(integer 5) /// STDize /// LOG /// SQRT /// SQUare /// RANK /// Center /// PErcentile(integer 10) /// TOPcode(real 99) /// BOTtomcode(real 1) /// MISSing(real .) /// REPLace /// DROPold /// VERBose /// SAVe(string) /// APPend(string) /// STATistics /// HELP /// ] * Check if varlist provided if "`varlist'" ==

*! gtools_macro.ado *! Full-featured data transformation and recoding tool *! Version 1.0 Version 1

* Verify variable exists confirm variable `oldvar'