5. Categorical Predictors Flashcards

1
Q

What is a categorical variable?

A

Only take discrete values that aren’t numerically meaningful

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

How should categorical variables be coded in r?

A

As Factor

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

What is meant by a binary variable/dummy variable?

A

Categorial variable with two levels (coded for as 0 and 1)

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

What is beta 0 hat in dummy coding?

A

Predicted value of y when x = 0

(mean of group coded 0)

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

What is beta one hat in dummy coding?

A

Predicted difference between the means of two groups

(Group 1 - Group 0)

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

What are the prediction equations for binary variable?

A

For 0 variable = Beta 0 hat
For 1 variable = Beta 1 = Group 1 - beta0

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

What does each beta coefficient mean in categorical variables with two levels?

A

Want each beta coefficient = Represents specific difference between means

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

What is deemed a good baseline in dummy coding?

A

Control group
Group expected to have lowest score on outcome
Largest Group

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

What is a bad baseline in dummy coding?

A

Poorly defined level
Much smaller than other groups

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

How many dummy variables will we have in relation to the number of predictors?

A

k-1 dummy variable

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

How is dummy coding, coded in r?

A

Coded contr.treatment

  • This specifies dummy coding and can change the reference level within r
How well did you know this?
1
Not at all
2
3
4
5
Perfectly