A4.14

Computational Statistics and Statistical Modelling | Part II, 2004

Suppose that Y1,…,YnY_{1}, \ldots, Y_{n} are independent observations, with YiY_{i} having probability density function of the following form

f(yi∣θi,ϕ)=exp⁡[yiθi−b(θi)ϕ+c(yi,ϕ)]f\left(y_{i} \mid \theta_{i}, \phi\right)=\exp \left[\frac{y_{i} \theta_{i}-b\left(\theta_{i}\right)}{\phi}+c\left(y_{i}, \phi\right)\right]

where E(Yi)=μi\mathbb{E}\left(Y_{i}\right)=\mu_{i} and g(μi)=βTxig\left(\mu_{i}\right)=\beta^{T} x_{i}. You should assume that g()g() is a known function, and β,ϕ\beta, \phi are unknown parameters, with ϕ>0\phi>0, and also x1,…,xnx_{1}, \ldots, x_{n} are given linearly independent covariate vectors. Show that

∂ℓ∂β=∑(yi−βi)g′(μi)Vixi\frac{\partial \ell}{\partial \beta}=\sum \frac{\left(y_{i}-\beta_{i}\right)}{g^{\prime}\left(\mu_{i}\right) V_{i}} x_{i}

where ℓ\ell is the log-likelihood and Vi=var⁡(Yi)=ϕb′′(θi)V_{i}=\operatorname{var}\left(Y_{i}\right)=\phi b^{\prime \prime}\left(\theta_{i}\right).

Discuss carefully the (slightly edited) R\mathrm{R} output given below, and briefly suggest another possible method of analysis using the function glm\mathrm{glm} ( ).

>s<−scan⁡()>s<-\operatorname{scan}()

1: 336315738108159\begin{array}{llllll}33 & 63 & 157 & 38 & 108 & 159\end{array}

7:

Read 6 items

>r<−scan⁡()>r<-\operatorname{scan}()

1: 327172565065248688773520

7:7:

Read 6 items

>> gender <- scan⁡(,"∥)\operatorname{scan}(, " \|)

1: b b b g g g

7:7:

Read 6 items

>> age <- scan⁡(,"′)\operatorname{scan}(, " \prime)

1: 13&under 14-18 19&over

4: 13&under 14-18 19&over

7 :

Read 6 items

>> gender <- factor (gender) ; age <- factor (age)

>summary⁡(glm(s/r∼>\operatorname{summary}(\mathrm{glm}(\mathrm{s} / \mathrm{r} \sim gender ++ age, binomial, weights =r))=\mathrm{r}))

Coefficients:

Null deviance: 221.797542221.797542 on 5 degrees of freedom

Residual deviance: 0.0987490.098749 on 2 degrees of freedom

Number of Fisher Scoring iterations: 3

Typos? Please submit corrections to this page on GitHub.