Hi everyone,
I have two dummy variables, holder67 and holder30, which are equal to 1 if the value of another variable, COND is equal or above 0.67 and 0.30 respectively.
Now I am looking to generate a new dummy variable "holder30-holder67", which will equal to 1 if holder30=1 but holder67=0 to capture low-to-moderate degree of overconfidence.
What would be the code to generate such dummy variable dependent on the values of other dummy variables?
Thanks in advance!
Related Posts with Generating dummy variable conditional to other dummy variable figures
create a loop to convert string variables in numeric variablesHello, I am Salvatore, happy to join the Stata Forum community. I am a new user who recently started…
Shortcut for generating new variables based on many existingI have groups of variables contactoutcome_con_<y>_<x> and contactmethod_con_<y>_&l…
bysort query issuesHello all: I am trying to replace first row of path with "CLL" and second row of path as "RT" for _…
Replace command with non-mutually exclusive categorical dataHello, I am working with a dataset from a Twitter content analysis project and am stuck trying out …
Matching without replacement from a file of pairs for case-control and other applicationsShort version: I’m seeking a solution to how to do 1:m matching of cases and controls without replac…
Subscribe to:
Post Comments (Atom)
0 Response to Generating dummy variable conditional to other dummy variable figures
Post a Comment