#### GTaiko

##### New Member
Hello,

I am trying to test whether my choice of link function is correct using the goodness-of-link test. So, firstly since I am testing the logistic link, I set alpha=1 (for the Aranda-Ordaz family) and then add this term to my glm model and evaluate the p-value of this term in the output. However, I don't think I am getting the correct answer. Is there any mistake in my logic? My code is listed below:

Code:
``````dr = glm(effective/total ~ log.dose, weight=total, family="binomial")

y.hat = dr\$fitted.values
alpha = 1
r = log(1-y.hat)/((1-y.hat)^alpha-1) - 1/alpha
test = glm(effective/total ~ log.dose + r, weight=total, family="binomial")``````