Hello!
I have been struggling with what I thought was an easy problem for a while now.
I am runing a before and after analysis for some binomial and categorical variables for which I am using a McNemar test since my data is paired. After doing some research I have been using the following code for both my binomial and my categorical variables:
However some of my 2x2 tables show that there are some empty cells and b + c <25, as far as I know, those variables should not be tested with a McNemar test. I have been doing some research and I can't seem to find the propper answer. In those cases my goal is to see if there are any differences in the number of people who have ever been diagnosed with let's say diabetes in year 1 vs year 2. Since the question says "Have you ever been diagnosed.." we will always have more people diagnosed in year 2 than in year 1 as someone who has been diagnosed cannot be undiagnosed and therefore cell b (or c depending how you look at it) will always be 0.
Some people suggest the best approach is to use a binomial exact test
while others suggest to use a logistic regression
However I don't think it quite means the same thing since.
So my question here is: what is the right approach in this case and why? and also is there also a better test for categorial variables?
Thank you very much!
I have been struggling with what I thought was an easy problem for a while now.
I am runing a before and after analysis for some binomial and categorical variables for which I am using a McNemar test since my data is paired. After doing some research I have been using the following code for both my binomial and my categorical variables:
Code:
symmetry FruitT0 FruitT1, contrib exact trend
Some people suggest the best approach is to use a binomial exact test
Code:
bitest Diab == 0.5
Code:
melogit Diab i. Year || ID:
So my question here is: what is the right approach in this case and why? and also is there also a better test for categorial variables?
Thank you very much!
Comment