Week 8: Linear regression Flashcards
What kind of variables are needed for linear regression?
2 continuous
What symbol is used for the correlation coefficient?
r
What does r vary between?
-1 and +1
What two pieces of information do you get from the correlation coefficient?
The direction (positive or negative)
The magnitude
What happens in a positive relationship?
As one variable goes up, so does the other
What happens in a negative relationship?
When one variable goes up, the other decreases
The regression line helps to…
Predict other scores
What is the regression equation?
= b (X) + a
What is b in the regression equation?
The slope - how much change in the outcome for each increase in the predictor
What do you multiply b with in the regression equation?
The value of the predictor variable
What is a in the regression equation?
The intercept - value of the outcome variable when the predictor is 0
How do you set up the data for a regression analysis in jamovi?
1x row per participant
1x column for each variable
all need to be continuous
What is the independent variable called in linear regression?
Predictor variable
What is the dependent variable called in linear regression?
Response or outcome variable
How do you begin the analysis in jamovi?
Regression - linear regression
DV box: put the variable in that you want to predict the outcome of
Covariates: continuous predictors - put predictor in
What fit measures and model coefficients do you ask for in a linear regression?
r
R squared
Adjusted r squared
ANOVA
Confidence intervals
What does r give you?
The correlation between the IV and DV
What does Rsquared tell you?
The proportion of the variance for a dependent variable that’s explained by an independent variable
Adjusted R squared
like R squared but takes into account smaller sample sizes
How do you generate a scatter plot in jamovi?
Exploration - scatter plot
Predictor in X axis box
Outcome into Y axis
Which table gives you the values for the regression equation?
The Model coefficients box
Also gives you the ability to give t tests for the slope, and the intercept
Which line definitely needs to be significant in the model coefficients box?
The slope - has to be different to zero
Both should be but especially the slope
Regression becomes more reliable when….
The sample size increases
Correlation and regression differences?
Correlation gives you the strength of the relationship between two continuous variables
Regression builds a model of this relationship to allow the prediction of other scores
What does it mean if the slope is not different to 0?
The two variables are independent - knowing a score of one does not tell us anything about the other
Correlation does not equal…….
causation
What is extrapolation and how does it relate to regression?
the action of estimating or concluding something by assuming that existing trends will continue
You can only use the regression model to make predictions within the data range
What kind of equation is used to describe curvy data?
Polynomial equations
What are the different kinds of polynomials?
Quadratic
Cubic
Quartic and so on
What is the equation for a quadratic equation?
Y = intercept + (slope1x(X)) + (slope2x(Xsquared)
Each increase in the polynomial tests indicates..
A bend in the data line
How do you do a quadratic regression in jamovi?
You need to first create another variable - IVsquared
- compute variable
- fx: IV*IV
Linear - Linear regression
DV - as normal
Covariates - normal IV and squared IV
In model builder tab - put normal IV into block one and the squared version into block 2
Output of a quadratic regression in jamovi?
Model fit measures: tells you about the quadratic model in comparison to linear
Model coefficients: can use to make new t-tests as well as the quadratic equation
Model comparisons: tells you how much better the quadratic is - deltaF (df1, df2) = F, p = p (can see if the difference is worthwhile by looking at statistical significance)
Can see increases in Rsquared
If a more complex model isnt improving the fit of the data but it looks better, what is it really doing?
Fitting the noise instead
AIC and BIC?
How much information is lost by the model
RMSEA?
Root mean square error of approximation
How much model misfit
<0.05 is a good fit
What 3 coefficients do you have with a quadratic model?
Constant
Linear coefficient
Quadratic coefficient
What do variables have to be able to do a trend analysis?
Quantitative, not qualitative
How can we use a one-way ANOVA for trend analysis?
If we get a significant ANOVA, can ask for polynomial contrasts in the contrasts menu
The output here will be a list of possible models - the ones that are significant tell us more about the data
What is trend analysis?
Helps to determine whether a linear or higher-order trend is required to describe the IV - DV relationship
The most complex possible trend to describe a line that passes through every group mean is…
= (the number of levels of the IV) - 1
What if the intercept = 0?
The slope is zero and the line is horizontal