Hi, this simple command is inconsistent each time I open my data set - please help me understand why.
drop if TNM_CLIN_T=="c1"&TNM_CLIN_N=="c0"
(807 observations deleted)
drop if TNM_CLIN_T==“c2”&TNM_CLIN_N==“c0”
“c2” invalid name
r(198);
browse TNM_CLIN_T <--- checking to make sure there are c2 values
drop if TNM_CLIN_T=="c2"
(3,734 observations deleted)
So essentially every time:
drop if VARIABLE=="a1" & VARIABLE2 == "a2"
- This command works just fine, but then I also want to drop on another condition with those variables:
drop if VARIABLE=="b1" & VARIABLE2 == "b2"
"b1" invalid name r(198)
- b1 is definitely there, no issues with the value, it's a string, double-checked on everything.
But if I do only
drop if VARIABLE == "b1"
on some runs it tells me it's invalid, and on some it works.
I am not doing anything else with this data set besides closing out and starting from scratch with these commands to try to specifically source where the issue is.
No success.
What could I be doing wrong? Why is it not finding the value seemingly inconsistently?
drop if TNM_CLIN_T=="c1"&TNM_CLIN_N=="c0"
(807 observations deleted)
drop if TNM_CLIN_T==“c2”&TNM_CLIN_N==“c0”
“c2” invalid name
r(198);
browse TNM_CLIN_T <--- checking to make sure there are c2 values
drop if TNM_CLIN_T=="c2"
(3,734 observations deleted)
So essentially every time:
drop if VARIABLE=="a1" & VARIABLE2 == "a2"
- This command works just fine, but then I also want to drop on another condition with those variables:
drop if VARIABLE=="b1" & VARIABLE2 == "b2"
"b1" invalid name r(198)
- b1 is definitely there, no issues with the value, it's a string, double-checked on everything.
But if I do only
drop if VARIABLE == "b1"
on some runs it tells me it's invalid, and on some it works.
I am not doing anything else with this data set besides closing out and starting from scratch with these commands to try to specifically source where the issue is.
No success.
What could I be doing wrong? Why is it not finding the value seemingly inconsistently?
Comment