Hey Folks
I am writing a code for doing a ttest for a variable where in i am eliminating certain strings with != sign. For some reason Stata is not correctly picking up the if condition. Here is the code.
I want to eliminate all the observations where either the job is not Information Specialist or Developer. I tried few codes but no luck
ttest income if job!="Information Specialist" & job!="Developer", by(firms)-- this is not correct as it checks both conditions are true (1 1)
ttest income if (job!="Information Specialist"| job!="Developer"), by(firms)
ttest income if (job!="Information Specialist"| job!="Developer"), by(firms)
Let me know how i can resolve this issue
Thanks
Veeresh
I am writing a code for doing a ttest for a variable where in i am eliminating certain strings with != sign. For some reason Stata is not correctly picking up the if condition. Here is the code.
I want to eliminate all the observations where either the job is not Information Specialist or Developer. I tried few codes but no luck
ttest income if job!="Information Specialist" & job!="Developer", by(firms)-- this is not correct as it checks both conditions are true (1 1)
ttest income if (job!="Information Specialist"| job!="Developer"), by(firms)
ttest income if (job!="Information Specialist"| job!="Developer"), by(firms)
Let me know how i can resolve this issue
Thanks
Veeresh
Comment