W2: Logistic Regression Flashcards

1
Q

Sometimes the responsee variable Y is not continous but binary, for example we may be interested in whether individuals (3)

Logistic regression

A
  • pass or fail
  • suffer from bipolar disorder or not
  • go to university or not
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Since Y (response) is binary, instead of continuous, we cannot use

A

multiple linear regression, instead we use logistic regression

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

Logistic regression equation formula:

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

What does p stand for in logistic regression equation formula?

A

probability , p, of the event of interest (response;y)

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

We can find the estimated proability p for an indivudal by rearranging the logistic regression equation formula:

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

How to put null hypothesis and alternate hypothesis of logistic regression?

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

Rather than a t-test in multiple linear regression, we use __ test in logistic regression

A

Wald test

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

Assess our model (fit) by considering the following 3 in logistic regression

A
  • R^2 value
  • Sensitivity and specificty model value
  • Signifiance of covariates
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Sensitvity and Specficity Table Labelled

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

In the sensitivty and specifcity table, we use the regression equation to make predictions then compare to observed values and display this information in a

A

contigency table

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

What is sensitivity of the model?

Logistic regression

A

Probabilty of predicting an event correctly

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

What is specificty of the model?

Logistic regression

A

Probability of predicting no event correctly of the model

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

Nagelkere R^2 can be interpreted

Logistic regression

A

the same way as R^2 in simple/multiple linear regression

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

Why is Nagelkere R^2 be treated as caution? - (2)

Logistic regression

A

There is no single way to calculate R^2 in logistic regression
As a result, the Nagelkere R^2 (and others) are often reffered to as pseudo-R^2

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

Step 1: Exploratory Analysis Example showing both covariates are useful - (3)

Logistic regression

A

From the boxplot, those who succeed (0) tend to be younger on average than those who fail (1), with less variability in their ages (boxplots)

From the table, we see more women (0) succeed at the task than fail, whereas men (1) fail than suceed

Both covariates are useful

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

Step 1: Exploratory Analysis Example - another example of boxplot

Logistic regression

A

From boxplot it shows those individuals who did not take a condom (0) had higher levels of embarassment on average than those who accepted a free condom (1) with less variability in their embarassment

17
Q

Step 2 - Naglekere R^2 (In SPSS) - (2)

Logistic regression

A

We see the Nagelkerke R^2 = 0.336 and so 33.6% of the variation in Y (e.g., success/failure) by the model

This seems low compared to multiple regression - but this is often the case.

18
Q

In contigency table, we want specificty and sensitvity close to __ % to be a good model

Logistic regression

A

100

19
Q

Step 2 - What is a good Naglekere R^2 value?

Logo regression

A

If you get somewhere around the 30s then tend to be a reasonable model (i.e., got reasonable predictions)

20
Q

Step 2 - Nagelkere R^2 in R

Logistic regression

A
21
Q

Step 1 - Explotatory Analysis - Table looking in R

Logistic regression

A
22
Q

Step 3 - Classification Table of Sensitivity and Specficity (in SPSS)

Logistic regression

A

From the table, the model has estimated sensitvity of 69.4% and an estimates specificty of 73.6% - seems reasonable.

23
Q

Step 3 - Classification Table of Sensitvity and Specificty in R Interpretation more detailed

(1) presence (0) absence of empathy - (3)

Logistic regression

A

Estimates sensitivty is 58. 3%
Estimated specificty is 94.7%

Model is particularly good at classifiying those with an absence of empathy (specificty)

Altough it classified those with empathy correctly over half of the time (sensitivity)

24
Q

Step 4 - Writing the logistic regression equation (in SPSS) + signifiance of predictors - (3)

Logistic regression

A

The regression equation is:

In(p/1-p) = -15.056 + 1.957(Sex) + 0.196(Age)

We see age and sex are both significant at the 0.1% level ( p < 0.001) so they are useful and should be kept in the model

25
Q

Step 4 - Writing the logistic regression equation (in R)

Logistic regression

A
26
Q

What is positive predicted value (PPV)? - 2

Logistic regression

A

This is the probability of an individual who is predicted to have the event it does

f/d+f

27
Q

What is negative predicted value (NPV)? - (2)

Logistic regression

A

This is the probability of an individual who is predicted not to have an event does not

c/c+e

28
Q

Assumptions in logistic regression - (3)

A
  • The response variable is binary
  • Observations are independent
  • There is oen or more covariate
29
Q

Sensitivity formula

Logistic regression

A

f/e+f

30
Q

Specificty formula

Logistic regression

A

c/c+d

31
Q

No formal checks for logistic regression

A

Assumptions

32
Q

If model has high specifcity then used it for

Logistic regression

Absence or presence of empathy in individuals for cats in distress

A

Because the model has such a high specificity in comparison to its
sensitivity, it would be best to use it to rule out empathy to particular cats in distress