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
how to set a dummy to arrange datahello I have a question needs to help. Z code mode I want to category Z variable below as gen zcode …
Treatment effect significant for a subpopulation?We analyse the effect of a policy change in soccer on the incidence of injuries. Due to our theoreti…
Deseasonalize dataHi all, Hope everything's fine on your side! I have a dataset having as inputs: the id of products,…
Sign change from margins dydx to margins dyex ?Hello everyone, I am running a logit model in which I try to forecast insolvency. The coefficients …
tsfillHello everyone, in my dataset i was having the gaps between dates so i decided to use tsfill comman…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a subsample with missing value restrictions
Post a Comment