Linear Regression Flashcards
What is linear regression?
A tool for describing relationships between multiple interval scale variables
In linear regression, the outcome and predictor are?
The outcomes and predictor are both numeric
We can have multiple predictors
What is the fundamental idea for linear regression?
Fit the best regression line to the data, then try to understand that line
What is the formula for a linear regression line?
Changing the intercept of the regression line does what to the line?
Raises or lowers the regression line.
Changing the slope of the regression line does what to the regression line?
Alters the steepness of the regression line
How do we know what the best regression line is?
The principle of ‘least squares’
What is the principle of least squares?
The best regression line for data (X,Y) is the one that minimises the sum squared deviation between the predictions and the actual values
This is referred to as the residual sum of squares
How do you estimate a simple linear regression model in R?
Like ANOVA, it is done in stages
- lm() estimates the values of b0, b1 etc
- summary() runs some hypothesis tests
The lm() function
This is the main “workhorse” function
It creates an “lm” object (i.e. variable), which contains lots of quantities of interest relating to regressions
What is a regression with only a single predictor called?
Simple linear regression
Mostly the same thing as Pearson correlations
In real life, we usually expect that multiple variables could predict our outcome, what is this called?
Multiple linear regression
The slope terms and intercept are called _____
Regression coefficients
What is the test statistic in a multiple linear regression?
F statistic
What is the sampling distribution of T if the null is true in multiple linear regression?
F distribution
Exactly analogous of ANOVA
The null hypothesis in ANOVA’s predict?
No relationship between the predictors and outcome
(all slope parameters are zero)