Consider the following Binomial generalized linear model for data y1,…,yn, with logit link function. The data y1,…,yn are regarded as observed values of independent random variables Y1,…,Yn, where
Yi∼Bin(1,μi),log1−μiμi=β⊤xi,i=1,…,n,
where β is an unknown p-dimensional parameter, and where x1,…,xn are known p dimensional explanatory variables. Write down the likelihood function for y=(y1,…,yn) under this model.
Show that the maximum likelihood estimate β^ satisfies an equation of the form X⊤y=X⊤μ^, where X is the p×n matrix with rows x1⊤,…,xn⊤, and where μ^= (μ^1,…,μ^n), with μ^i a function of xi and β^, which you should specify.
Define the deviance D(y;μ^) and find an explicit expression for D(y;μ^) in terms of y and μ^ in the case of the model above.