Generalised Linear Models Flashcards

1
Q

GLM Components

A
  1. Random part
  2. Systematic part
  3. Link function
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Random Part

Definition

A

f(y;θ,φ) = exp[ (yθ-b(θ)) / φ + c(y,φ) ]

θ = canonical (or natural) parameter
φ > 0 , the scale parameter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Systematic Part

Definition

A

-the linear predictor:
η = Σ βj xj
-sum from j=1 to j=p where p is the number of observations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Link Function

Definition

A

η = g(μ) where μ=E(y)
=>
μ = g^(-1) (η) = h(η)
-where g is the link function and h is the inverse link function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to find the random part?

A
  • write out the probability distribution function,f
  • rewrite in terms of an exponential
  • use the form of the random part to find θ, φ, b and c
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

GLM

Expectation

A

E(y) = b’(θ)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

GLM

Variance

A

Var(y) = φ b’‘(θ)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

GLM

Expectation Proof

A

-by definition of the probability density function:
1 = ∫ f(yi,θ) dy
-differentiate wrt θ
-sub in f for a GLM to do the differentiation
-revert back to f
-separate into two integrals
-sub in E(y) from the definition of expectation into the first
-use 1 = ∫ f(yi,θ) dy in the second

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

GLM

Variance Proof

A

-by definition of the probability density function:
1 = ∫ f(yi,θ) dy
-differentiate wrt θ
-sub in f for a GLM to do the differentiation
-revert back to f
-differentiate wrt θ a second time
-sub in definition of Var(y) and 1 = ∫ f(yi,θ) dy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Systematic Part in Matrix Form

A

η = Σ βj xj
-but for each observation, yi, the explanatory variables may differ:
ηi = Σ βj xij
-or in matrix notation:
η = X β
-where η = (η1,…,ηn)^T is a vector of linear predictor variables, β = (β1,…,βp)^T is a vector of regression parameters and X is an nxp design matrix

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How to find the canonical link function?

A

-the canonical link function is a mathematically and computationally convenient choice of link function
-set θ=η
-since E(y) = b’(θ) = μ
=>
θ = b’^(-1) (μ) = η

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Canonical Link Function, g’(μ)

A

g’(μ) = 1/b’‘(θ)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Maximum Likelihood Estimation for GLMs

A
f(y;θ,φ) = exp[ (yθ-b(θ)) / φ + c(y,φ) ]
-then the likelihood is:
L[f(y;θ,φ)] = Π f(yi;θ,φ)
-take natural log:
l[f(y;θ,φ)] = Σ [ yiθ-b(θ) / φ  +  c(yi,φ) ]
= n * [θy^ - b(θ) / φ  +  const.
-maximise wrt θ
-where y^ is the mean
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

The Saturated Model

Definition

A

-when the data are fitted exactly to the model

μi^ = b’(θi^) = yi

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Deviance

Definition

A

D = 2φ [ l(θ~,y,φ) - l(θ^,y,φ) ]
-where the first likelihood term l(θ~,y,φ) refers to the saturated model and the second, l(θ^,y,φ), refers to the fitted model

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Deviance

Steps to Find

A
  • express f(y) as an exponential
  • log-likelihood is ln(f(yi)) summed over i
  • find μi = b’(θi) to express parameters in terms of the mean estimate
  • for the fitted model term, replace parameters with mean
  • do the same for the saturated model term only with μi=yi
  • sub into formula for D
  • cancel any remaining terms that can be cacelled
17
Q

Deviance

Distribution, φ=1 - goodness of fit

A

-goodness of fit

D ~ χ²_(n-r)

18
Q

Deviance

Distribution, φ=1 - model comparison

A
-model comparison of M1 and M2
M1 = 1 + E
M2 = M2 + E + F
-i.e. model two considers one extra explanatory variable / effect
(D1 - D2) ~ χ²_{(r2-r1)
19
Q

Deviance

Distribution, φ unknown

A

-estimate φ with model 3:
φ = D3 / (n-r3)
-then test M1 against M2 with:
[ (D1-D2)/(r2-r1) ] / φ ~ F_(r2-r1, n-r3)

20
Q

Raw (response) Residuals

A

ei = yi - μi^

21
Q

Standardised Residuals

A

ei = (yi-μi^) / √b’‘(θi)

22
Q

Deviance Residuals

A

ei = sign(yi-μi^) √di

-where di is the deviance for individual i