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
Ordinal variables in Latent profile analysisDear Stata users, I have again a doubt on the latent profile analysis in Stata (gsem command). Amon…
Scalars and results r(something), and using such in expressions, and properly dereferencing such scalars and resultsI just realised that I have no idea what is the logic behind how scalars and results such as r(somet…
Gini index interpretation - time use dataHi everyone, I am using Italian Time Use surveys to analyze parental time investments. I used ineqde…
Removing observations with missing values after reshaping to long formatHi I'm sure there is probably a simple solution to this but no matter how much I have looked for an…
Mathematical equations in PutdocxHello, I am deciding whether to upgrade Stata for the putdocx features. I cannot tell whether putdo…
Subscribe to:
Post Comments (Atom)
0 Response to Filtering in Stata
Post a Comment