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
Generating a row total sum for each time a strpos from the list is foundHi, I am currently working with ICD10 codes and getting stuck on a question I feel like probably has…
Collecting exact 95% CII am conducting a survey analysis where I'm looking at proportions with the svy command. I'm using t…
matching with smae (Chinese) words?Dear All, I found this question here (https://bbs.pinggu.org/thread-10628284-1-1.html). Suppose that…
Saving & using multiple scalars to generate new variablesHi all, I am trying to create a new indicator variable based on whether an individual is in the top…
Ttest between pop mean and sample meanHi, For a balance table, I am working on, I have generated the sample means and proportion of my d…
Subscribe to:
Post Comments (Atom)
0 Response to Filtering in Stata
Post a Comment