Week 1- r-studio notes Flashcards
library(broom)
Makes analysis tidier and easier to work with
how do you read in data with ‘millerhadendata.csv’
mh <- read_csv (‘millerhadendata.csv’)
what does ggplot(mh,aes(x=Abil, y=IQ)) mean?
ggplot- telling r to create graphics
aes- aesthetics (what you want to plot)
what is geom(point)
plotting points on the graph
what does geom_smooth(method = ‘lm’, se = FALSE) mean
geom_smooth- adds a trend line over an existing plot (line of best fit)
lm = linear models
se = standard error
How would you conduct a correlation analysis using Pearsons R
results<- cor.test(mh$Abil,
mh$IQ,
method = ‘pearson’
alternative= ‘two.sided’ %>%
tidy()
what do you need to include when looking at the results of a pearsons R
in results section…
estimate = pearsons
p.value = pvalue
parameter = degrees of freedom
how do you report results for a pearsons r
r <- results %>%
pull(estimate) %>%
round(2)
how do you report results for degrees of freedom
df <- results %>%
pull(parameter)