Hello everyone

I have run into some STATA problems during my exam project, and I would greatly appreciate if anyone could help me.

The problem is that i am struggling with my multivariate analysis. I started out with a bivariate analyse with two variable, lets call them X and Y... X (the independent variable) is an interval variable, but Y (the dependent variable) is a nominal variable, therefore I have been inclined to use lambda as my correlation coefficient.
Now my problem is, that I want to test this correlation between X and Y by controlling a third variable, Z.
In class I have been taught that it is done with:

bysort "Z": tabulate "X" "Y", gamma nofreq

But as it also says in the code... this gives me a gamma correlation coefficient. As far as I believe, I cannot compare a lambda coefficient and a gamma coefficient. What should I do? Is there another code? Is it even possible to make a multivariate analysis when I used lambda beforehand? Please help!!

Best regards