Week 1- r-studio notes Flashcards

1
Q

library(broom)

A

Makes analysis tidier and easier to work with

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

how do you read in data with ‘millerhadendata.csv’

A

mh <- read_csv (‘millerhadendata.csv’)

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

what does ggplot(mh,aes(x=Abil, y=IQ)) mean?

A

ggplot- telling r to create graphics
aes- aesthetics (what you want to plot)

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

what is geom(point)

A

plotting points on the graph

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

what does geom_smooth(method = ‘lm’, se = FALSE) mean

A

geom_smooth- adds a trend line over an existing plot (line of best fit)
lm = linear models
se = standard error

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

How would you conduct a correlation analysis using Pearsons R

A

results<- cor.test(mh$Abil,
mh$IQ,
method = ‘pearson’
alternative= ‘two.sided’ %>%
tidy()

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

what do you need to include when looking at the results of a pearsons R

A

in results section…
estimate = pearsons
p.value = pvalue
parameter = degrees of freedom

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

how do you report results for a pearsons r

A

r <- results %>%
pull(estimate) %>%
round(2)

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

how do you report results for degrees of freedom

A

df <- results %>%
pull(parameter)

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