Chi-square problem

Hi! Help please! I have a table with variables "doctor_speciality" (cardiology, oncology, dermatology and etc.), "city" (different cities), and "smoker_status" (smoker, non-smoker). I need to compare frequency of cardiology-smokers from NY and from Texas using Chi-square. How I can do it? Or I need to use other test?


TS Contributor
Seemingly, you need to create a variable "state" first. Then you can use the procedure select cases,
in order to select cases from NY and those from Texas, and in addition only those with speciality "cardiology".

With kind regards

Last edited: