I am interested in changing the null hypotheses using
glm() in R.
x = rbinom(100, 1, .7) summary(glm(x ~ 1, family = "binomial"))
tests the hypothesis that $p = 0.5$. What if I want to change the null to $p$ = some arbitrary value, within
I know this can be done also with
chisq.test(), but I'd like to explore the idea of using
glm() to test all hypotheses relating to categorical data.
glmby default) is the logit, to avoid confusion it's important to distinguish $p$ from its logit, which is the log odds $\log(p/(1-p))$. $\endgroup$