Hi
I have a small query. I am trying to generate a new variable (X), based on my existing 3 variables (A, B and C). I want the new variable X to equal A if A has a non-missing value. In case of A's value is missing, then X should equal B, if however if B's value is missing then X should equal C's value. I tried using if and else if commands but I am not being able to execute it properly. Kindly share any help or suggestions. Thank You.
Related Posts with Generating a new variable on non-missing condition
How to deal with Likert Scale Variables as 101 StatalistHello guys, I have done some Google research regarding my topic and he brought me here. I actually f…
placebo analysis: time falsification and location falsificationHi , My variable of interest is an indicator variable (LAW) that equals 1 if a firm is in a state h…
Hansen test for xtdpdsysHi. I am fairly new to stata but can anyone tell me how I can get the Hansen j statistics after usin…
command _qregtrace is unrecognizedWhen I used command "grqreg" to graph quantile regressions, I got error saying "command _qregtrace i…
The estimate significant level of XTSURDo you think it is normal to have ALL variables extremely significant like p < 0.000? After I ran…
Subscribe to:
Post Comments (Atom)
0 Response to Generating a new variable on non-missing condition
Post a Comment