I'm trying to do a logistic regression between two variables, where I want to extract the p-value of the correlation between them. However, it seems that the function glm() splits the dependable variable into the unique values it contains, and I receive only a p-value for each of them and not one for the entire variable. Is there a way to instead get a p-value for the entire dependent variable? That's what I get if I do the test in SPSS, so it seems it's possible with logistic regression in general. But is it in R with this function?
Here is a minimal reproducible example:
attach(PlantGrowth)
weight.factor<- cut(weight, 2, labels=c('Light', 'Heavy')) # binarize weights
plot(table(group, weight.factor))
group
glm.1<- glm(weight.factor~group, family=binomial)
summary(glm.1)
Best regards