Gtools Macro May 2026

* Parse variable list - use first variable only tokenize `varlist' local oldvar = "`1'"

* 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 /// ] * Parse variable list - use first variable

* Check if variable exists if "`replace'" == "" capture confirm new variable `newvar' if _rc != 0 di as error "Variable `newvar' already exists. Use replace option." exit 198 gtools macro

Amos Struck
Amos Struck

I am a publisher and entrepreneur in the stock imagery field. I focus in providing knowledge and solutions for buyers, contributors and agencies, aiming at contributing to the growth and development of the industry. I am the founder and editor of Stock Photo Press, one of the largest networks of online magazines in the industry. I am the founder of Microstock Expo, the only conference dedicated to the microstock segment. I created several software solutions in stock photography, like the PixelRockstar WordPress Plugin. Plus I am a recurrent speaker at Photokina Official Stage, and an industry consultant at StockPhotoInsight. I am passionate about technology, marketing and visual imagery.

We will be happy to hear your thoughts

Leave a reply

Footage Secrets
Logo