Gaussian linear models (GLMs) Flashcards

1
Q

Assumptions of GLMs

A
  • Linearity: E[Yi|x1i, … xki] = μi = β0 + β1x1i + βkxki ∀ i
  • Homoschedasticity: Var(Yi|x1i, … xki) = σ2 ∀ i
  • Conditional (linear) uncorrelation: cov(Yi|x1i, … xki, Yh|x1h, … xkh = 0 ∀ i ≠ h
  • Normality: Yi|x1i, … xki ~N(μi, σ2 which, together with uncorrelation, makes for the conditional independence assumption.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

GLM definition

A

Y | X ~ Nn (Xβ, σ2In)
Or, alternatively: Yi = β0 = β1x1i + … βkxki + εi, with εi|x1i, … xki ~ Nn(0, σ2)

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

Fitting GLMs in R

A

lm(y~x1+x2) #Based on OLS
glm(y~x1+x2, family=gaussian)
- Std. Error = [σ2^ (X’X)-1]1/2jj
- Residual standard error = sqrt(σ2^) not MLE
- glm shows Null deviance (model only with β0, n-1) and Residual deviance (n-p)

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

Linearity assumption checking in R

A

plot(fit, which=1)
- Residuals VS Fitted
- Red line (local average) straight on 0: no systematic difference between fitted values and observed ones if we focus on units sharing about the same covariance pattern

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

Normality assumption checking in R

A

plot(fit, which=2)
- QQ-Plot
- Points on the bisetrix: same distribution between theoretical and empirical quantiles of the standardized residuals

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

Homoschedasticity assumption checking in R

A

plot(fit, which=3)
- Scale-Location plot
- Red line (local average) straight on 1: the variability pattern does not change

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