Hi guys I'm in the following situation: My dataset: 400 patients: 150 of them had surgery between 1994-1998 and 250 had surgery between 1998-2005. Of the 150, 50 had leukemia, 30 breast cancer and 70 had lung cancer. Of the 250, 65 had leukaemia, 120 breast cancer and 65 lung cancer. The question is ti check if there's an enrichment of a tumour type according to the range of years of surgery (1994-1998 and 1998-2005). I was thinking to perform a Fisher test but, for some reasons, my boss would like a logistic regression. I have no idea how to perform the logistic regression with such data. Can anyone help me please?
If you're only interested in whether there's a difference in proportion of the two types of cancers between the two groups, then a chi-squared test or Fisher's exact test are appropriate and simpler. A logistic regression is possible but it would evaluate the cancer type as a function of the year, i.e. it would answer whether the year predicts the type of cancer, which is not really what you seem to be asking from the data. If you don't know why you should do one approach over the other, I suggest you ask your supervisor for explanation, maybe there are more factors that need to be taken into account.
Anyway, you can do logistic regression with the glm() function in R, something like
model <- glm(cbind(breast,lung) ~ year, data = your.data.set, family = binomial)