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
Doubts on autocorrelationDear Statalist users, I am kind of new with Stata and I'd really appreciate your help. I have been w…
Question about replace with multiple Criteria based on identifierHello friends. I have a dataset like this: ID Qualification Score A BS A Graduated A MS …
Stata/MP 16 memory issueHi, I am having trouble with memory. My file size is 86mb and I have a memory of 8GM. I am using Sta…
Stata/MP 16: op. sys. refuses to provide memoryHi, I am having trouble with memory. My file size is 86mb and I have a memory of 8GM. I am using Sta…
Stata/MP 16 memory issueHi, I am having trouble with memory. My file size is 86mb and I have a memory of 8GM. I am using Sta…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a subsample with missing value restrictions
Post a Comment