I have a problem with logistic regression.
I have the following variables:
Var1: 1 1 1 0 0 1 1 1 1 1 1 1 1 0 1 0 0 1 1 1 1 1 1 1 1 0 0 NA 1 0 0 1 0 1 1 0 0 0 1 1 0 0 1 1 1 0 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1
Var2: 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 0 1 0 1 0 0 1
Var1 is continuous (It doesn't seem continuous because of my data, but in my study I have similar variables with 2,3,4.....)
Var2 is categorical
When I do logistic regression
mylogit <- glm(Var2 ~ Var1, data = mydata, family = "binomial")
I obtain a p value of 0.994 but It's not true, because I think that my data should have a p value < 0.05 since I obtain a p value < 0.001 doing a t-test.
I think that my problem is that all "1" in Var2 match with a "1" in Var1.
I' have checked this post:
and I have tried all the methods described in this post and I never obtain a significant p value.
Perhaps my problem is different, I don't know.
What should I do to obtain a realistic p value with my data???
Thank you very much.