Chapter 1 - Data Visualisation Flashcards

1
Q

Remove observations (rows) with missing values

A

DF = DF %>% tidyr::drop_na()

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

Dpylr::Glimpse()

Str()

A

Inspect structure of objects

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

Matrix[1,2]

A

Access element in 1st row, 2nd column

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

Matrix[1:3, 2:4]

A

Returns matrix with data from rows 1, 2, 3 and columns 2, 3, 4

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

Matrix[ ,1]

A

All elements of the 1st column

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

Literary digest poll (1936)

A

Roosevelt won a high no. Of votes fo US presidential election despite predicted victory for Landon.

10 million people were polled via mail survey of which 2.4 responded back.

  • Americans suffered from Great Depression then
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Survey sampling

A
  • selecting subset of observations from an entire population to draw conclusions about the whole population
  • consider design, maximise profit, high reliability, optimisation with less resources
  • type of survey design that’s appropriate for the study
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Selection bias

A

Taking a large sample thinking it would make a difference (repetition of error on a large scale)

  • inaccurate representation of the population
  • getting opinion based on certain qs asked e.g should a doctor be allowed to murder unborn kids who can’t defend themselves?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Measurement bias

A
  • recall bias
  • misinterpret questions
  • sensitive questions
  • wording of question
  • sampling method influences data obtained
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Non-response bias

A
  • certain groups are under-represented due to lack of participation

E.g those that choose to not respond/ not participate in research experiment, those that don’t want to give a tip/fill out ‘customer satisfaction’ after eating at restaurant

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

Randomised controlled double blind trials

A

Allocates subjects into a treatment + control group randomly

  • neither subjects nor investigators know who’s in which group
  • investigator compares responses of the 2 groups and if there is a difference in response it’s likely due to be caused by the treatment
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Observational studies

A
  • doesn’t establish causation, only establishes association
  • used in educational research
  • if had confounding variable can lead to Simpson’s Paradox
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Confounding variables

A

When both treatment + control group differ by some 3rd variable that influences the response that is studied

  • e.g if not all subjects keep taking the treatment/placebo, we can get confounding of adherers/non-adherers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly