prop.table
), differences in means (group_by() %>% summarize()
), correlation (cor
), and graphically with scatterplots (plot(xvar,yvar)
) and overlaid densities (plot(density())
followed by lines(density())
)X
explain Y
” as “what would I expect Y
to look like, given a certain value of X
?”addata <- read.csv('http://www.nickchk.com/ad_spend_and_gdp.csv')
plot(addata$AdSpending,addata$GDP,
xlab='US Ad Spend/Year (Mil.)',ylab='US GDP (Bil.)')
X
, see what Y
looks like.Y
for different values of X
.