R Data Frame Operations & Sampling Bias in Statistics

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/29

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

30 Terms

1
New cards

sampling bias

a sampling method that consistently over or under represents certain data points (always rounding up or down)

2
New cards

measurment Error

Random inaccuracy in data collection

3
New cards

Sampling variation

natural differences b/w samples drawn from the same population

4
New cards

Rows in a data frame

cases/observations

5
New cards

Columns in a data frame

variables

6
New cards

Quotation marks in R

For text/character data

7
New cards

Symbol ! in R

NOT.

8
New cards

Symbol != in R

Not equal to.

9
New cards

Symbol == in R

Equal to.

10
New cards

- in R

Subtracts OR removes a variable in select().

11
New cards

how to Update part of a vector in R

By reassigning it (vec[2] <- 5)

12
New cards

tally() function

Counts frequencies.

13
New cards

select() function

selects multiple variables and makes a data table (select(df,y1,y2))

14
New cards

filter() function

Keeps only rows that meet a condition.

15
New cards

arrange() function

arrange rows by a variable.

16
New cards

str() or glimspe function

Shows structure of a data frame (lists variables).

17
New cards

factor() function

Coverts quant. to cat. variables

18
New cards

head() function

Shows first 6 rows.

19
New cards

tail() function

Shows last 6 rows.

20
New cards

sample() function

Draws a random sample.

21
New cards

Filter out missing data in R

filter(df, !is.na(variable)) or filter(df, is.na(variable)==False)

22
New cards

Tilde ~ in R

Means 'about.' Used in formulas like y ~ x = 'y depends on x.'

23
New cards

as.numeric

converts cat. to quant.

24
New cards

mutate()

adds or modifies varaibles (mutuate(df, variable = "y")

25
New cards

Quick overview of data frame variables

str(df) or glimpse(df).

26
New cards

Concerns when generalizing from data

sample is not random, representative, or lacks variation.

27
New cards

select()

produces a data table with a subset of chosen variables

28
New cards

recode()

recodes values by putting old ones in quoations and equaling to a new value (df, "0" = 2)

29
New cards

Random sampling

when every object has an equal chance of being chosen in a population

30
New cards

independent sampling

when selecting 1 object does not affect the chance of selecting another