Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Nick Cox <njcoxstata@gmail.com> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | Re: st: strip factor variable operators? |
Date | Tue, 13 Aug 2013 22:29:19 +0100 |
-tsrevar- is a start. Nick njcoxstata@gmail.com On 13 August 2013 22:22, Stas Kolenikov <skolenik@gmail.com> wrote: > Dear statalisters, > > is there a simple way to strip out the time series and factor variable > operators? I have a list of regressors with all sorts of stuff like > -i.foreign ib3.rep78 c.price##c.price-, and I want to produce a list > that is cleaned off the prefixes, just -foreign rep78 price-. Is there > a standard parser, or an extended macro function, to do this? I can > take the whole list, -gettoken, parse(".")- each term and strip the > part before the dot, if there's any. But this seems like a relatively > mundane task that must be doable with some official Stata tools. > > > -- Stas Kolenikov, PhD, PStat (ASA, SSC) > -- Senior Survey Statistician, Abt SRBI > -- Opinions stated in this email are mine only, and do not reflect the > position of my employer > -- http://stas.kolenikov.name > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/faqs/resources/statalist-faq/ > * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/