I have been trying to look for Stata equivalent of this SPSS filter creation
" USE ALL.
COMPUTE filter_$=(PT = 0 & impval > 0 & PRICE >= 10000 & VI = "I" & AYB < 2020 & AR="A" &
ANY(IMP,1,3,4,5,8,9,50,51) & XDATE.YEAR(SALEDT)=2019 & INSTR = "WD").
VARIABLE LABELS filter_$ 'PT = 0 & impval > 0 & PRICE >= 10000 & VI = "I" & AYB < 2020 & AR="A" '+
'& ANY(IMP,1,3,4,5,8,9,50,51) & XDATE.YEAR(SALEDT)=2019 & INSTR = "WD" (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE." Any help would be appreciated
0 Response to Filtering in Stata
Post a Comment