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
Applying different colors to data points in scatter plotHi! I am trying to create a graph like the one below where I can apply different colors to data poin…
Sargan-Hansen testHi. I am trying to obtain results for the Sargan-Hansen test. However, when I run a regression usin…
Reshape wide to long: many variables of many yearsHi All, I have a dataset with more than 10 variables of more than 10 years in wide shape. I'm tryin…
Transforming a series to be standard normal in panel dataHi all, May I have a basic question: how can I make/transform a series/variable to be standard norm…
Significant OLS results but insignificant IV results and the insignificant endogeneity testDear all, I want to explore the effects of X on Y. Considering X might be an exogenous variable, I …
Subscribe to:
Post Comments (Atom)
0 Response to Filtering in Stata
Post a Comment