vis u ali z ing bi v ariate relationships
play

Vis u ali z ing bi v ariate relationships C OR R E L ATION AN D R - PowerPoint PPT Presentation

Vis u ali z ing bi v ariate relationships C OR R E L ATION AN D R E G R E SSION IN R Ben Ba u mer Assistant Professor at Smith College Bi v ariate relationships Both v ariables are n u merical Response v ariable a . k . a . y, dependent E x


  1. Vis u ali z ing bi v ariate relationships C OR R E L ATION AN D R E G R E SSION IN R Ben Ba u mer Assistant Professor at Smith College

  2. Bi v ariate relationships Both v ariables are n u merical Response v ariable a . k . a . y, dependent E x planator y v ariable Something y o u think might be related to the response a . k . a . x, independent , predictor CORRELATION AND REGRESSION IN R

  3. Graphical representations P u t response on v ertical a x is P u t e x planator y on hori z ontal a x is CORRELATION AND REGRESSION IN R

  4. Scatterplot ggplot(data = possum, aes(y = totalL, x = tailL)) + geom_point() CORRELATION AND REGRESSION IN R

  5. Scatterplot ggplot(data = possum, aes(y = totalL, x = tailL)) + geom_point() + scale_x_continuous("Length of Possum Tail (cm)") + scale_y_continuous("Length of Possum Body (cm)") CORRELATION AND REGRESSION IN R

  6. Bi v ariate relationships Can think of bo x plots as sca � erplots … … b u t w ith discreti z ed e x planator y v ariable cut() f u nction discreti z es Choose appropriate n u mber of " bo x es " CORRELATION AND REGRESSION IN R

  7. Scatterplot ggplot(data = possum, aes(y = totalL, x = cut(tailL, breaks = 5))) geom_point() CORRELATION AND REGRESSION IN R

  8. Scatterplot ggplot(data = possum, aes(y = totalL, x = cut(tailL, breaks = 5))) geom_boxplot() CORRELATION AND REGRESSION IN R

  9. Let ' s practice ! C OR R E L ATION AN D R E G R E SSION IN R

  10. Characteri z ing bi v ariate relationships C OR R E L ATION AN D R E G R E SSION IN R Ben Ba u mer Assistant Professor at Smith College

  11. Characteri z ing bi v ariate relationships Form ( e . g . linear , q u adratic , non - linear ) Direction ( e . g . posti v e , negati v e ) Strength ( ho w m u ch sca � er / noise ?) O u tliers CORRELATION AND REGRESSION IN R

  12. CORRELATION AND REGRESSION IN R

  13. Sign legibilit y CORRELATION AND REGRESSION IN R

  14. NIST CORRELATION AND REGRESSION IN R

  15. NIST 2 CORRELATION AND REGRESSION IN R

  16. Non - linear CORRELATION AND REGRESSION IN R

  17. Fan shape CORRELATION AND REGRESSION IN R

  18. Let ' s practice ! C OR R E L ATION AN D R E G R E SSION IN R

  19. O u tliers C OR R E L ATION AN D R E G R E SSION IN R Ben Ba u mer Assistant Professor at Smith College

  20. O u tliers ggplot(data = mlbBat10, aes(x = SB, y = HR)) + geom_point() CORRELATION AND REGRESSION IN R

  21. Add transparenc y ggplot(data = mlbBat10, aes(x = SB, y = HR)) + geom_point(alpha = 0.5) CORRELATION AND REGRESSION IN R

  22. Add some jitter ggplot(data = mlbBat10, aes(x = SB, y = HR)) + geom_point(alpha = 0.5, position = "jitter") CORRELATION AND REGRESSION IN R

  23. Add some jitter ggplot(data = mlbBat10, aes(x = SB, y = HR)) + geom_point(alpha = 0.5, position = "jitter") CORRELATION AND REGRESSION IN R

  24. Identif y the o u tliers mlbBat10 %>% filter(SB > 60 | HR > 50) %>% select(name, team, position, SB, HR) name team position SB HR 1 J Pierre CWS OF 68 1 2 J Bautista TOR OF 9 54 CORRELATION AND REGRESSION IN R

  25. Let ' s practice ! C OR R E L ATION AN D R E G R E SSION IN R

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend