--- title: "ISI2 Exploration 1.1" output: word_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) load(url("http://www.isi-stats.com/isi2/ISI.RData")) options(repos=c(CRAN="https://ftp.osuosl.org/pub/cran/")) install.packages("lattice") ``` ## Load in the data file, e.g., ```{r} MemorizingLettersCP <- read.table("http://www.isi-stats.com/isi2/data/MemorizingLettersCP.txt", sep="\t", header=T, stringsAsFactors = T) head(MemorizingLettersCP) ``` **11) Create numerical and graphical summaries of the outcomes of the response variable for your class.** ```{r} hist(MemorizingLettersCP$Score) isisummary(MemorizingLettersCP$Score) ``` **Summarize your observations in context.** **13) Now create numerical and graphical summaries comparing the results for the two tatment groups.** ```{r} library(lattice) histogram(~MemorizingLettersCP$Score | MemorizingLettersCP$Sequence, layout = c(1,2)) isisummary(MemorizingLettersCP$Score, MemorizingLettersCP$Sequence) ``` **Based on the group means, did one of the sequence groups tend to score higher than the other? By a lot or just a little? Which sequence group had more variable results? Are there any other interesting features of the meaningful sequence scores that make sense in context?** ##Separate Means Models ```{r} #standard error of residuals summary(lm(MemorizingLettersCP$Score ~ MemorizingLettersCP$Sequence))$sigma ``` **18) Examine the distributions of sleep hours for the two treatment groups.** ```{r} histogram(~MemorizingLettersCP$Sleep.hrs. | MemorizingLettersCP$Sequence, layout = c(1,2)) isisummary(MemorizingLettersCP$Sleep.hrs., MemorizingLettersCP$Sequence) ``` **Does amount of sleep appear to be a confounding variable in this study? How do you decide?** ##Caffeine vs. Sequence ```{r} with(MemorizingLettersCP, barplot(prop.table(table(Caffeine., Sequence), margin=2), legend=T)) ```