Normal Linear Models Flashcards

1
Q

Linear Regression

y

A
  • dependent/response variable

- assume y is normally distributed for linear regression

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

Linear Regression

x

A

x = (x1,…,xp)

  • where p is the number of covariates
  • independent variables / covariates / predictor variables
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Linear Regression

Model

A

y = α + Σ βj xj

-sum from j = 1 to j=p, where p is the number of predictor variables

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

Linear Regression

Residual Sum of Squares

A

R = Σ (yi - μi^)²

  • sum from i = 1 to n where n is the number of observations
  • and μi^ is the fitted value for yi
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Linear Regression

Compare Models With F-Statistic

A

-compare model 0 with model 1
-null hypothesis: model 0 is best
-alternative: model 1 is best
F01 = (Ro-R1)/(r0-r1) / R1/r1
-where:
r = residual degrees of freedom
R = residual sum of squares

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

Logistic Function

A

logistic(x) = 1 / (1 + exp(-x))

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

Logit Function

A

-inverse of the logistic function

logit(q) = log(q / 1-q)

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

Types of Variable

A
  • quantitative

- qualitative

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

Types of Variable

Quantitative

A
  • continuous

- count

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

Types of Variable

Qualitative

A
  • un-ordered categorical
  • -dichotomous (two categories)
  • -polytomous (more than two categories)

-ordered categorical

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

Types of Normal Linear Model

Quantitative Explanatory Variable, p=1

A

-simple linear regression

y = α + βx1 + ε

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

Types of Normal Linear Model

Quantitative Explanatory Variable, p>1

A

-multiple linear regression
y = α + Σ βixi + ε
-sum from i=1 to i=p

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

Types of Normal Linear Model

Dichotomous Explanatory Variable, p=1

A

-two sample t-test
-dichotomous: x=1 or 2
y = α + γ I(x=2) + ε
-where, I(x=j) = { 1 if x=j, or 0 else}

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

Types of Normal Linear Model

Polytomous Explanatory Variable, p=1

A

-one-way anova
-polytomous: x=1,…,k
y = α + Σ δj I(x=j) + ε
-sum from j=1 to j=k

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

Matrix Representations of Normal Linear Models

A

Y = XΒ + E
-where Y is an nx1 vector of observations, X is an nxp ‘design matrix’, B is a px1 vector of parameters and E is an nx1 vector of errors

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

Constructing the Design Matrix

A

1) first column is a vector of 1s (intercept)
2) for each explanatory variable:
- -if quantitative: add xi as a column
- -if qualitative: add k dummy columns taking values 0 or 1, then remove one of these columns
3) for interaction terms e.g. for x1*x2, add a column of x1 values multiplied by x2 values

17
Q

Notation for Models

~

A

~ = modelled by / regressed by

18
Q

Maximum Likelihoos Estimation

A
  • the likelihood is equal to the probability density function, f(y)
  • take ln to get log-likelihood
  • differentiate with respect to parameter and set equal to zero
19
Q

Normal Distribution

Probability Density Function

A

f(y) = 1/σ√2π * exp{-1/2 * [(x-μ)/σ]²}

20
Q

Poisson Distribution

Probability Mass Function

A

f(y) = λ^y * exp(-λ) / k!

21
Q

Binomial Distribution

Probability Mass Function

A

f(y) = mCy * p^y * [1-p]^(m-y)

22
Q

What is the purpose of a generalised linear model?

A

-to model the dependence of a dependent variable, y, on a set of p explanatory variables, x=(x1,…,xp), where ,conditionally on x, observation y has a distribution which is not necessarily normal

23
Q

Normal Linear Model

Definition

A

-a model that assumes the distribution of the dependent variable is Gaussian