Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: strip factor variable operators?
From
Stas Kolenikov <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: strip factor variable operators?
Date
Tue, 13 Aug 2013 16:22:19 -0500
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/