I wanna remove multiple subtrings from a macro.
The final macro looks like
and I desire
and so on. How might I do this?
Methodologically, I like the forward selection method, but in my personal opinion it WILDLY overfits the time-series in the pre-intervention period thus resulting in a noisy counterfactual. The author tells me that the method doesn't play well with non-stationary time series data, so I wanna see if I can fix it.
Nevermind, I got it
Code:
qui ssc inst rcm, replace
import delim "https://raw.githubusercontent.com/jehangiramjad/tslib/master/tests/testdata/prop99.csv", clear
loc int_time = 1989
drop if year >= 2001
keep if submeasureiddisplayorder==2
rename (locationdesc data_value) (state cigsale)
keep state year cig
egen id = group(state)
order id, b(year)
drop if inlist(id,3,22,38,10,12,2,12,23,31,33,48)
xtset id year, y
cls
rcm cig, ///
trunit(5) ///
trperiod(`int_time') ///
method(forward) ///
cr(mbic) frame(cig_wide)
local sel = subinstr("`e(predvar_sel)'","cigsale", """,",.)
di "`sel'"
Code:
·43 ·28 ·47 ·1 ·24 ·44 ·4 ·40 ·41 ·6 ·27 ·45 ·25 ·29 ·14 ·30
Code:
,43,28,47,1,24,44,4
Methodologically, I like the forward selection method, but in my personal opinion it WILDLY overfits the time-series in the pre-intervention period thus resulting in a noisy counterfactual. The author tells me that the method doesn't play well with non-stationary time series data, so I wanna see if I can fix it.
Nevermind, I got it
Code:
local sel = subinstr("`e(predvar_sel)'","cigsale·",","",",.)

Comment