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
Related Posts with Filtering in Stata
Using reg or xtreg?Hi I'm new to STATA. Just completed a survey capturing about 3000+ responses from different city/pro…
Problem with renaming varsHi, I would like to rename a set of vars if they end with odd numbers and are between 1 and 42. The …
New post-estimation command -suregr- available on SSC: calculates robust, or cluster robust variance post -sureg- estimation.Thanks to Kit Baum, I have made available on SSC a new post estimation command -suregr- (mnemonic fo…
Bug in collapse (percent) command?The collapse (percent) command is supposed to yield the percentage of nonmissing observations. Howev…
xtabond2 with p-value of AR(1) test > 0.1Dear All, In a typical application (xtabond2 to a dynamic panel data model), one often needs to chec…
Subscribe to:
Post Comments (Atom)
0 Response to Filtering in Stata
Post a Comment