Dear all
From the entire sample list ,I would like to create a sub-sample based on certain condtions.Say, I have 3 variables,assets,profits&sales.I want to create a subsample by imposing certain conditions on the specified variables and here is what I did.
gen estsample = 1 if assets>=0&profits>100&sales<200000.
It turns out that wherever the values are missing for all of these, estample 1 is created. I want stata to keep it as missing ,if either of these variables are missing.How to do this
Thanks in advance
Related Posts with Creating a subsample with missing value restrictions
metaprop - show subgroup pooled estimates onlyI using metaprop on 160 studies, subgrouping data by country. I want to suppress the study-level est…
svyset: missing standard error because of stratum with single sampling unitSince the dataset I'm using has a Stratum (v022) with only one PSU (v021), and I have to use the fol…
Weighting of Indian Demographic Health Survey (2015-16) dataUsing the Indian DHS 2015-16 data for my analysis, I have merged three files together (1) Person fil…
zoib regressionHi everyone, I have used the zero-one inflated beta regression but I have concerns. My dependent var…
Covariances across groups and quarters Code: * Example generated by -dataex-. To install: ssc install dataex clear input byte qrtr float(…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a subsample with missing value restrictions
Post a Comment