Data skill - Multiple predictors

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/23

encourage image

There's no tags or description

Looks like no tags are added yet.

24 Terms

1
New cards

equation for regression line with 2 Num

y = b0 +b1 X1 +b2 X2

  • b0 = intercept

  • b1/b2 = slope for each variable

  • X1/ x2 are the X value for each num varaible


2
New cards

How to interpret b0 with 2 num

if both the <predictors> are 0 then we expect the mean value of <response> to be <b0> <units>

3
New cards

how to interpret b1/2 with 2 num

is still the slope but shows the relationship between that variable and y when the other numeric predictor is 0

  • if the <x1/2> increases by 1 <unit> and <x2/1> remains unchanged, we expected the mean value of <response> to <increase /decrease> by <b1/2> <units>


4
New cards

how many predictors should you use for regression

the r-value (explains variance) will only ever increase by adding more predictors; however, this can lead to an artificial inflation of results.

  • Instead, going as simple as possible is best as fewer assumptions need to be made


5
New cards

how to calculate fitted vales with 2 num

fitted values = b0 + b1 xi1 + b2 xi2

  • same as one numeric, except the fitted value is the value on the line that has the same x for both numeric variables as the observed varaible


6
New cards

how to calculate residuals with two num

the same the observed y minus the fitted value for that data point

7
New cards

How to check assumptions with two num

we have the same assumptions that can be checked the same way

  • Linearity and constant spread use a fitted vs. residuals plot, and normality uses a Q- Q plot

  • can also determine linearity and constant spread using a scatter plot of residuals vs observations


8
New cards

parameters and statistics in two num

sample stats: b0, b1, b2 ( b0 and b1 are not the same as they are in one num)

parameters: beta 0,1,2 ( can make predictions using sample stats through CI and hypothesis testing)

  • needs to be done for both b1 and b2 separately


9
New cards

confidence intervals in two num

b2/1 ± t* x SE1/2

  • uses a t-distribution with df of n-2

  • in the intervals for one variable when the other stays the same

  • uses sig. of 0.1


10
New cards

what are the hypothesis used with two num

null: beta ½ = 0

alternate: beta ½ doesn’t = 0

  • still determine one variable effect on another


11
New cards

what is the test stat in hypothesis testing for two num

b2/1 /the standard error of b2/1

  • t distribution with df of n-3


12
New cards

how can prediction be made for induviduals for two num

Done the same way, but with the standard error of the mean

  • The outcome is more precise than it is with one numeric, as we are able to account for a greater amount of variance


13
New cards

how can predictions be made for populations for two num

also the same as one numeric predictor

14
New cards

how can a categorical variable be added in regression

  1. we allow each category to have its own slope ( interaction model)

  2. we force each category to have the same slope ( no intercation model)


15
New cards

What is coding catagories

since categorical variable can not be added into an equation, we assign each subcategory numeric variables

  • if two subcategories then one v = 1 and the other = 0

  • if >two subcategories, then we add number of categories - 1 indicator variables


16
New cards

why do we do an n -1 indicator variables when you have more than 2 category

  • Category 1 will be represented when all categories (b2,3,4…) = 0

  • Each other category will be represented when that category = 1 but all others = 0

  • b1 he represents the numeric variable’s effect


17
New cards

what is the no interaction model

A model that shows the effect of each of the subcategories of the categorical variable on the response alongside the numeric predictors' effects

  • Used if you want to know the categorical varaibles effect on the response

  • Same slope means we can’t claim that the increase between the Numeric predictor and the response is the same for each subcategory


18
New cards

how to code for categories ( no interaction model)

if the category has three possible answers, the equation would look like this

  • overall: y = b0 + b1 ×1 + b2 ×2 + b3 ×3

  • cat 1: b0 + b1 ×1

  • cat 2: (bo +b2) + b1 ×1

  • cat 3 (b0 + b3) + b1 ×1


19
New cards

what is the interaction model

Where we allow the multiplication of the numeric predictor and one of the subcategories and their effect on the response variable

  • if you want to know the effect of each subcategory

  • need to add interaction terms to the equation

  • allow for an overall r2 to be calculated


20
New cards

what are the benefits of using a interaction model

allows us to plot separate models for each categorical variable depending on the numeric variable

  • also allows us to compare the difference of each subcategory’s effect


21
New cards

what is an intercation term

a term used to show the interaction between each subcategory and the numeric varaible

  • overall: y = b0 + b1 ×1 + b2 ×2 + b3 ×3 + b4 ×1 × 2, b5 ×1 ×3

  • cat 2: y = (bo + b2) + (b1 + b4) x1

  • the extra bn represent the intercepts of each slope for each subcategory


22
New cards

how to interpret b0 or b1 in one num one cat

b0: represents the predicted value of y when the numeric variable is zero and non of the subcategories applies

b1 ( with interaction: shows the main effect of the numeric predictor on the response


23
New cards

how to interpret b2,3,4… in one num, one cat

show the effect of that category on the response variable when the numeric variable = 0

24
New cards

how are any Assumptions checked or predictions done using 1 num and 1 cat

The same way as with 1 numeric predictor, but typically done using R

  • doesn’t really go through checking assumption for this set of variables