I used this command to get the expected output:
`Thyroid$cancer <- relevel(Thyroid$cancer, ref = "No")``
The default in R ia No but it did not work here and I have no idea why. I had to specify the reference using the above coce. Any answer as to why R did not use "No" as the default will be appreciated.
R for an unknown reason to me used "Yes" as the reference. I am not sure if I was supposed to declare the outcome as factor to fix this issue??
Thanks