library(tidyverse)
library(keyringr)
library(DBI)
library(DT)
library(ggplot2)
library(scales)
library(knitr)
library(plotly)
library(kableExtra)
library(ggthemes)
library(lubridate)
library(plyr)
library(DescTools)
library(car)
library(rgl)
library(MKmisc)
library(psych)
library(apaTables)
library(gmodels)
library(ResourceSelection)
library(lavaan)
library(semPlot)
Placement<- read.csv("Placement.csv")

Placement<- Placement%>%
  mutate(EnglishStart = if_else(StartTerm == Col_Eng_Term, 1, 0, missing = NULL))

Placement<- Placement%>%
  mutate(MathStart = if_else(StartTerm == Col_Math_Term, 1, 0, missing = NULL))


MathC_Term<- Placement%>%
  subset(College_Math_Pass %in% c(1,0))
MathC_Term<- MathC_Term %>%
 dplyr:: select(Col_Math_Term, College_Math_Pass, College_Math_Grade, MathStart, HSGPA, ACT_Math, ALEKS)
MathC_Term<- MathC_Term %>%
  subset(Col_Math_Term %in% c("10/FA", "11/FA", "12/FA", "13/FA", "14/FA", "15/FA", "16/FA", "17/FA", "18/FA", "19/FA", "20/FA"))

MathC_Term_First<- MathC_Term %>%
  subset(MathStart == 1)

EnglC_Term<- Placement%>%
  subset(College_English_Pass %in% c(1,0))
EnglC_Term<- EnglC_Term %>%
dplyr:: select(Col_Eng_Term, College_English_Pass, College_English_Grade, EnglishStart, HSGPA, ACT_Engl, ACT_Reading, McCann_R, McCann_W)
EnglC_Term<- EnglC_Term %>%
  subset(Col_Eng_Term %in% c("10/FA", "11/FA", "12/FA", "13/FA", "14/FA", "15/FA", "16/FA", "17/FA", "18/FA", "19/FA", "20/FA"))

EnglC_Term_First<- EnglC_Term %>%
  subset(EnglishStart == 1)
 
PlacementMath<- Placement%>%
  subset(Col_Math_Term %in% c("10/FA", "11/FA", "12/FA", "13/FA", "14/FA", "15/FA", "16/FA", "17/FA", "18/FA", "19/FA", "20/FA"))

statistics<- Placement %>%
  subset(CourseName.y.y == "STAT*2070") %>%
  subset(Col_Math_Term %in% c("10/FA", "11/FA", "12/FA", "13/FA", "14/FA", "15/FA", "16/FA", "17/FA", "18/FA", "19/FA", "20/FA"))

math1400<- Placement %>%
  subset(CourseName.y.y %in% c("MATH*1400", "MATH*1401", "Math*1010")) %>%
  subset(Col_Math_Term %in% c("10/FA", "11/FA", "12/FA", "13/FA", "14/FA", "15/FA", "16/FA", "17/FA", "18/FA", "19/FA", "20/FA"))
library(gmodels)
FTTable<-with(Placement, table(StartTerm))
FTTable
## StartTerm
## 00/FA 00/SP 00/SU 01/FA 01/SP 01/SU 02/FA 02/SP 02/SU 03/FA 03/SP 03/SU 04/FA 
##    14    15     1    23     7     3    42    23     4    56    32     8    55 
## 04/SP 04/SU 05/FA 05/SP 05/SU 06/FA 06/SP 06/SU 07/FA 07/SP 07/SU 08/FA 08/SP 
##    32     8    77    52    20   108    38    12   162    52    14   220    72 
## 08/SU 09/FA 09/SP 09/SU 10/FA 10/SP 10/SU 11/FA 11/SP 11/SU 12/FA 12/SP 12/SU 
##    18   294   102    40   390   121    59   408   195    55   415   176    46 
## 13/FA 13/SP 13/SU 14/FA 14/SP 14/SU 15/FA 15/SP 15/SU 16/FA 16/SP 16/SU 17/FA 
##   440   135    47   465   153    48   652   146    67   571   172    34   510 
## 17/SP 17/SU 18/FA 18/SP 18/SU 19/FA 19/SP 19/SU 20/FA 20/SP 20/SU 21/FA 21/SP 
##   142    43   471   106    39   451   105    21   350    72    13   293    74 
## 21/SU 22/FA 84/SU 85/FA 85/SP 86/FA 86/SP 87/FA 87/SP 87/SU 88/FA 88/SP 89/FA 
##    16     2     1     2     2     3     1    10     3     1     8     3    11 
## 89/SP 89/SU 90/FA 90/SP 90/SU 91/FA 91/SP 91/SU 92/FA 92/SP 92/SU 93/FA 93/SP 
##     5     2    10     2     2    15     6     1     8     2     4    13     4 
## 93/SU 94/FA 94/SP 94/SU 95/FA 95/SP 95/SU 96/FA 96/SP 96/SU 97/FA 97/SP 97/SU 
##     6    10     4     2    12    13     3    22     6     6    21    10     1 
## 98/FA 98/SP 98/SU 99/FA 99/SP 99/SU 
##    19     3     4    17    16     5
library(gmodels)
library(xlsx)

MathFirst<-CrossTable(Placement$Col_Math_Term, Placement$MathStart, chisq = FALSE, prop.r = TRUE, prop.c = FALSE, expected = FALSE, prop.t = FALSE)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  5462 
## 
##  
##                         | Placement$MathStart 
## Placement$Col_Math_Term |         0 |         1 | Row Total | 
## ------------------------|-----------|-----------|-----------|
##                   10/FA |       140 |        39 |       179 | 
##                         |     0.287 |     0.849 |           | 
##                         |     0.782 |     0.218 |     0.033 | 
## ------------------------|-----------|-----------|-----------|
##                   11/FA |       162 |        43 |       205 | 
##                         |     0.500 |     1.482 |           | 
##                         |     0.790 |     0.210 |     0.038 | 
## ------------------------|-----------|-----------|-----------|
##                   11/SP |       205 |        12 |       217 | 
##                         |    11.286 |    33.415 |           | 
##                         |     0.945 |     0.055 |     0.040 | 
## ------------------------|-----------|-----------|-----------|
##                   12/FA |       135 |        36 |       171 | 
##                         |     0.402 |     1.192 |           | 
##                         |     0.789 |     0.211 |     0.031 | 
## ------------------------|-----------|-----------|-----------|
##                   12/SP |       164 |        21 |       185 | 
##                         |     4.779 |    14.149 |           | 
##                         |     0.886 |     0.114 |     0.034 | 
## ------------------------|-----------|-----------|-----------|
##                   13/FA |       193 |        65 |       258 | 
##                         |     0.000 |     0.000 |           | 
##                         |     0.748 |     0.252 |     0.047 | 
## ------------------------|-----------|-----------|-----------|
##                   13/SP |       258 |        13 |       271 | 
##                         |    15.161 |    44.890 |           | 
##                         |     0.952 |     0.048 |     0.050 | 
## ------------------------|-----------|-----------|-----------|
##                   14/FA |       179 |        63 |       242 | 
##                         |     0.020 |     0.059 |           | 
##                         |     0.740 |     0.260 |     0.044 | 
## ------------------------|-----------|-----------|-----------|
##                   14/SP |       259 |        17 |       276 | 
##                         |    13.452 |    39.830 |           | 
##                         |     0.938 |     0.062 |     0.051 | 
## ------------------------|-----------|-----------|-----------|
##                   15/FA |       264 |        78 |       342 | 
##                         |     0.272 |     0.807 |           | 
##                         |     0.772 |     0.228 |     0.063 | 
## ------------------------|-----------|-----------|-----------|
##                   15/SP |       216 |        14 |       230 | 
##                         |    11.295 |    33.444 |           | 
##                         |     0.939 |     0.061 |     0.042 | 
## ------------------------|-----------|-----------|-----------|
##                   16/FA |       173 |       145 |       318 | 
##                         |    17.617 |    52.162 |           | 
##                         |     0.544 |     0.456 |     0.058 | 
## ------------------------|-----------|-----------|-----------|
##                   16/SP |       226 |        25 |       251 | 
##                         |     7.847 |    23.233 |           | 
##                         |     0.900 |     0.100 |     0.046 | 
## ------------------------|-----------|-----------|-----------|
##                   17/FA |       151 |       118 |       269 | 
##                         |    12.475 |    36.936 |           | 
##                         |     0.561 |     0.439 |     0.049 | 
## ------------------------|-----------|-----------|-----------|
##                   17/SP |       194 |        22 |       216 | 
##                         |     6.555 |    19.409 |           | 
##                         |     0.898 |     0.102 |     0.040 | 
## ------------------------|-----------|-----------|-----------|
##                   18/FA |       118 |       116 |       234 | 
##                         |    18.523 |    54.844 |           | 
##                         |     0.504 |     0.496 |     0.043 | 
## ------------------------|-----------|-----------|-----------|
##                   18/SP |       153 |        19 |       172 | 
##                         |     4.640 |    13.738 |           | 
##                         |     0.890 |     0.110 |     0.031 | 
## ------------------------|-----------|-----------|-----------|
##                   19/FA |       110 |       131 |       241 | 
##                         |    27.319 |    80.887 |           | 
##                         |     0.456 |     0.544 |     0.044 | 
## ------------------------|-----------|-----------|-----------|
##                   19/SP |       139 |        20 |       159 | 
##                         |     3.414 |    10.107 |           | 
##                         |     0.874 |     0.126 |     0.029 | 
## ------------------------|-----------|-----------|-----------|
##                   20/FA |       198 |       153 |       351 | 
##                         |    15.798 |    46.775 |           | 
##                         |     0.564 |     0.436 |     0.064 | 
## ------------------------|-----------|-----------|-----------|
##                   20/SP |       109 |        19 |       128 | 
##                         |     1.853 |     5.487 |           | 
##                         |     0.852 |     0.148 |     0.023 | 
## ------------------------|-----------|-----------|-----------|
##                   21/FA |       145 |       172 |       317 | 
##                         |    35.692 |   105.679 |           | 
##                         |     0.457 |     0.543 |     0.058 | 
## ------------------------|-----------|-----------|-----------|
##                   21/SP |       192 |        38 |       230 | 
##                         |     2.342 |     6.936 |           | 
##                         |     0.835 |     0.165 |     0.042 | 
## ------------------------|-----------|-----------|-----------|
##            Column Total |      4083 |      1379 |      5462 | 
## ------------------------|-----------|-----------|-----------|
## 
## 
MathPass<-CrossTable(MathC_Term$Col_Math_Term, MathC_Term$College_Math_Pass, chisq = FALSE, prop.r = TRUE, prop.c = FALSE, expected = FALSE, prop.t = FALSE)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  2815 
## 
##  
##                          | MathC_Term$College_Math_Pass 
## MathC_Term$Col_Math_Term |         0 |         1 | Row Total | 
## -------------------------|-----------|-----------|-----------|
##                    10/FA |        23 |       157 |       180 | 
##                          |     3.261 |     0.744 |           | 
##                          |     0.128 |     0.872 |     0.064 | 
## -------------------------|-----------|-----------|-----------|
##                    11/FA |        52 |       156 |       208 | 
##                          |     4.616 |     1.053 |           | 
##                          |     0.250 |     0.750 |     0.074 | 
## -------------------------|-----------|-----------|-----------|
##                    12/FA |        47 |       124 |       171 | 
##                          |     7.301 |     1.666 |           | 
##                          |     0.275 |     0.725 |     0.061 | 
## -------------------------|-----------|-----------|-----------|
##                    13/FA |        50 |       209 |       259 | 
##                          |     0.073 |     0.017 |           | 
##                          |     0.193 |     0.807 |     0.092 | 
## -------------------------|-----------|-----------|-----------|
##                    14/FA |        32 |       210 |       242 | 
##                          |     3.736 |     0.853 |           | 
##                          |     0.132 |     0.868 |     0.086 | 
## -------------------------|-----------|-----------|-----------|
##                    15/FA |        53 |       289 |       342 | 
##                          |     1.748 |     0.399 |           | 
##                          |     0.155 |     0.845 |     0.121 | 
## -------------------------|-----------|-----------|-----------|
##                    16/FA |        55 |       263 |       318 | 
##                          |     0.282 |     0.064 |           | 
##                          |     0.173 |     0.827 |     0.113 | 
## -------------------------|-----------|-----------|-----------|
##                    17/FA |        41 |       228 |       269 | 
##                          |     1.613 |     0.368 |           | 
##                          |     0.152 |     0.848 |     0.096 | 
## -------------------------|-----------|-----------|-----------|
##                    18/FA |        37 |       197 |       234 | 
##                          |     0.964 |     0.220 |           | 
##                          |     0.158 |     0.842 |     0.083 | 
## -------------------------|-----------|-----------|-----------|
##                    19/FA |        53 |       188 |       241 | 
##                          |     1.511 |     0.345 |           | 
##                          |     0.220 |     0.780 |     0.086 | 
## -------------------------|-----------|-----------|-----------|
##                    20/FA |        80 |       271 |       351 | 
##                          |     3.353 |     0.765 |           | 
##                          |     0.228 |     0.772 |     0.125 | 
## -------------------------|-----------|-----------|-----------|
##             Column Total |       523 |      2292 |      2815 | 
## -------------------------|-----------|-----------|-----------|
## 
## 
MathFTpass<- CrossTable(MathC_Term_First$Col_Math_Term, MathC_Term_First$College_Math_Pass, chisq = FALSE, prop.r = TRUE, prop.c = FALSE, expected = FALSE, prop.t = FALSE)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  987 
## 
##  
##                                | MathC_Term_First$College_Math_Pass 
## MathC_Term_First$Col_Math_Term |         0 |         1 | Row Total | 
## -------------------------------|-----------|-----------|-----------|
##                          10/FA |         3 |        36 |        39 | 
##                                |     3.075 |     0.786 |           | 
##                                |     0.077 |     0.923 |     0.040 | 
## -------------------------------|-----------|-----------|-----------|
##                          11/FA |        16 |        27 |        43 | 
##                                |     5.991 |     1.532 |           | 
##                                |     0.372 |     0.628 |     0.044 | 
## -------------------------------|-----------|-----------|-----------|
##                          12/FA |        17 |        19 |        36 | 
##                                |    12.751 |     3.261 |           | 
##                                |     0.472 |     0.528 |     0.036 | 
## -------------------------------|-----------|-----------|-----------|
##                          13/FA |        12 |        53 |        65 | 
##                                |     0.116 |     0.030 |           | 
##                                |     0.185 |     0.815 |     0.066 | 
## -------------------------------|-----------|-----------|-----------|
##                          14/FA |        10 |        53 |        63 | 
##                                |     0.624 |     0.160 |           | 
##                                |     0.159 |     0.841 |     0.064 | 
## -------------------------------|-----------|-----------|-----------|
##                          15/FA |        12 |        66 |        78 | 
##                                |     0.950 |     0.243 |           | 
##                                |     0.154 |     0.846 |     0.079 | 
## -------------------------------|-----------|-----------|-----------|
##                          16/FA |        29 |       116 |       145 | 
##                                |     0.009 |     0.002 |           | 
##                                |     0.200 |     0.800 |     0.147 | 
## -------------------------------|-----------|-----------|-----------|
##                          17/FA |        21 |        97 |       118 | 
##                                |     0.382 |     0.098 |           | 
##                                |     0.178 |     0.822 |     0.120 | 
## -------------------------------|-----------|-----------|-----------|
##                          18/FA |        20 |        96 |       116 | 
##                                |     0.556 |     0.142 |           | 
##                                |     0.172 |     0.828 |     0.118 | 
## -------------------------------|-----------|-----------|-----------|
##                          19/FA |        28 |       103 |       131 | 
##                                |     0.066 |     0.017 |           | 
##                                |     0.214 |     0.786 |     0.133 | 
## -------------------------------|-----------|-----------|-----------|
##                          20/FA |        33 |       120 |       153 | 
##                                |     0.109 |     0.028 |           | 
##                                |     0.216 |     0.784 |     0.155 | 
## -------------------------------|-----------|-----------|-----------|
##                   Column Total |       201 |       786 |       987 | 
## -------------------------------|-----------|-----------|-----------|
## 
## 
write.csv(MathFirst,"MathFirst.csv")
write.csv(MathPass, "MathPass.csv")
write.csv(MathFTpass, "MathFTPass.csv")
library(gmodels)
EnglishFirst<-CrossTable(Placement$Col_Eng_Term, Placement$EnglishStart, chisq = FALSE, prop.r = TRUE, prop.c = FALSE, expected = FALSE, prop.t = FALSE)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  4995 
## 
##  
##                        | Placement$EnglishStart 
## Placement$Col_Eng_Term |         0 |         1 | Row Total | 
## -----------------------|-----------|-----------|-----------|
##                  10/FA |       149 |       112 |       261 | 
##                        |     0.348 |     0.415 |           | 
##                        |     0.571 |     0.429 |     0.052 | 
## -----------------------|-----------|-----------|-----------|
##                  11/FA |       148 |       105 |       253 | 
##                        |     0.783 |     0.934 |           | 
##                        |     0.585 |     0.415 |     0.051 | 
## -----------------------|-----------|-----------|-----------|
##                  11/SP |       144 |        25 |       169 | 
##                        |    29.498 |    35.183 |           | 
##                        |     0.852 |     0.148 |     0.034 | 
## -----------------------|-----------|-----------|-----------|
##                  12/FA |       120 |       105 |       225 | 
##                        |     0.047 |     0.056 |           | 
##                        |     0.533 |     0.467 |     0.045 | 
## -----------------------|-----------|-----------|-----------|
##                  12/SP |       132 |        27 |       159 | 
##                        |    23.951 |    28.566 |           | 
##                        |     0.830 |     0.170 |     0.032 | 
## -----------------------|-----------|-----------|-----------|
##                  13/FA |       110 |       109 |       219 | 
##                        |     0.699 |     0.833 |           | 
##                        |     0.502 |     0.498 |     0.044 | 
## -----------------------|-----------|-----------|-----------|
##                  13/SP |       130 |        21 |       151 | 
##                        |    27.893 |    33.268 |           | 
##                        |     0.861 |     0.139 |     0.030 | 
## -----------------------|-----------|-----------|-----------|
##                  14/FA |       117 |       137 |       254 | 
##                        |     3.241 |     3.866 |           | 
##                        |     0.461 |     0.539 |     0.051 | 
## -----------------------|-----------|-----------|-----------|
##                  14/SP |       114 |        16 |       130 | 
##                        |    26.499 |    31.605 |           | 
##                        |     0.877 |     0.123 |     0.026 | 
## -----------------------|-----------|-----------|-----------|
##                  15/FA |       145 |       221 |       366 | 
##                        |    14.692 |    17.524 |           | 
##                        |     0.396 |     0.604 |     0.073 | 
## -----------------------|-----------|-----------|-----------|
##                  15/SP |       127 |        35 |       162 | 
##                        |    17.156 |    20.462 |           | 
##                        |     0.784 |     0.216 |     0.032 | 
## -----------------------|-----------|-----------|-----------|
##                  16/FA |       126 |       232 |       358 | 
##                        |    24.259 |    28.934 |           | 
##                        |     0.352 |     0.648 |     0.072 | 
## -----------------------|-----------|-----------|-----------|
##                  16/SP |       162 |        37 |       199 | 
##                        |    26.695 |    31.840 |           | 
##                        |     0.814 |     0.186 |     0.040 | 
## -----------------------|-----------|-----------|-----------|
##                  17/FA |       131 |       212 |       343 | 
##                        |    16.553 |    19.743 |           | 
##                        |     0.382 |     0.618 |     0.069 | 
## -----------------------|-----------|-----------|-----------|
##                  17/SP |       122 |        42 |       164 | 
##                        |    12.055 |    14.378 |           | 
##                        |     0.744 |     0.256 |     0.033 | 
## -----------------------|-----------|-----------|-----------|
##                  18/FA |       108 |       186 |       294 | 
##                        |    16.856 |    20.105 |           | 
##                        |     0.367 |     0.633 |     0.059 | 
## -----------------------|-----------|-----------|-----------|
##                  18/SP |       121 |        26 |       147 | 
##                        |    21.064 |    25.124 |           | 
##                        |     0.823 |     0.177 |     0.029 | 
## -----------------------|-----------|-----------|-----------|
##                  19/FA |        98 |       226 |       324 | 
##                        |    34.732 |    41.426 |           | 
##                        |     0.302 |     0.698 |     0.065 | 
## -----------------------|-----------|-----------|-----------|
##                  19/SP |       120 |        30 |       150 | 
##                        |    18.080 |    21.565 |           | 
##                        |     0.800 |     0.200 |     0.030 | 
## -----------------------|-----------|-----------|-----------|
##                  20/FA |        69 |       169 |       238 | 
##                        |    28.235 |    33.676 |           | 
##                        |     0.290 |     0.710 |     0.048 | 
## -----------------------|-----------|-----------|-----------|
##                  20/SP |        95 |        30 |       125 | 
##                        |    10.727 |    12.795 |           | 
##                        |     0.760 |     0.240 |     0.025 | 
## -----------------------|-----------|-----------|-----------|
##                  21/FA |        48 |       144 |       192 | 
##                        |    30.498 |    36.376 |           | 
##                        |     0.250 |     0.750 |     0.038 | 
## -----------------------|-----------|-----------|-----------|
##                  21/SP |        81 |        31 |       112 | 
##                        |     6.617 |     7.893 |           | 
##                        |     0.723 |     0.277 |     0.022 | 
## -----------------------|-----------|-----------|-----------|
##           Column Total |      2717 |      2278 |      4995 | 
## -----------------------|-----------|-----------|-----------|
## 
## 
EnglishPass<-CrossTable(EnglC_Term$Col_Eng_Term, EnglC_Term$College_English_Pass, chisq = FALSE, prop.r = TRUE, prop.c = FALSE, expected = FALSE, prop.t = FALSE)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  3137 
## 
##  
##                         | EnglC_Term$College_English_Pass 
## EnglC_Term$Col_Eng_Term |         0 |         1 | Row Total | 
## ------------------------|-----------|-----------|-----------|
##                   10/FA |        15 |       246 |       261 | 
##                         |     7.464 |     0.968 |           | 
##                         |     0.057 |     0.943 |     0.083 | 
## ------------------------|-----------|-----------|-----------|
##                   11/FA |        20 |       234 |       254 | 
##                         |     2.872 |     0.372 |           | 
##                         |     0.079 |     0.921 |     0.081 | 
## ------------------------|-----------|-----------|-----------|
##                   12/FA |        23 |       202 |       225 | 
##                         |     0.308 |     0.040 |           | 
##                         |     0.102 |     0.898 |     0.072 | 
## ------------------------|-----------|-----------|-----------|
##                   13/FA |        20 |       199 |       219 | 
##                         |     1.048 |     0.136 |           | 
##                         |     0.091 |     0.909 |     0.070 | 
## ------------------------|-----------|-----------|-----------|
##                   14/FA |        18 |       236 |       254 | 
##                         |     4.264 |     0.553 |           | 
##                         |     0.071 |     0.929 |     0.081 | 
## ------------------------|-----------|-----------|-----------|
##                   15/FA |        54 |       312 |       366 | 
##                         |     3.427 |     0.444 |           | 
##                         |     0.148 |     0.852 |     0.117 | 
## ------------------------|-----------|-----------|-----------|
##                   16/FA |        51 |       307 |       358 | 
##                         |     2.393 |     0.310 |           | 
##                         |     0.142 |     0.858 |     0.114 | 
## ------------------------|-----------|-----------|-----------|
##                   17/FA |        44 |       299 |       343 | 
##                         |     0.546 |     0.071 |           | 
##                         |     0.128 |     0.872 |     0.109 | 
## ------------------------|-----------|-----------|-----------|
##                   18/FA |        36 |       258 |       294 | 
##                         |     0.151 |     0.020 |           | 
##                         |     0.122 |     0.878 |     0.094 | 
## ------------------------|-----------|-----------|-----------|
##                   19/FA |        35 |       290 |       325 | 
##                         |     0.141 |     0.018 |           | 
##                         |     0.108 |     0.892 |     0.104 | 
## ------------------------|-----------|-----------|-----------|
##                   20/FA |        44 |       194 |       238 | 
##                         |    10.195 |     1.322 |           | 
##                         |     0.185 |     0.815 |     0.076 | 
## ------------------------|-----------|-----------|-----------|
##            Column Total |       360 |      2777 |      3137 | 
## ------------------------|-----------|-----------|-----------|
## 
## 
EnglishFT<- CrossTable(EnglC_Term_First$Col_Eng_Term, EnglC_Term_First$College_English_Pass, chisq = FALSE, prop.r = TRUE, prop.c = FALSE, expected = FALSE, prop.t = FALSE)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  1814 
## 
##  
##                               | EnglC_Term_First$College_English_Pass 
## EnglC_Term_First$Col_Eng_Term |         0 |         1 | Row Total | 
## ------------------------------|-----------|-----------|-----------|
##                         10/FA |         8 |       104 |       112 | 
##                               |     2.096 |     0.282 |           | 
##                               |     0.071 |     0.929 |     0.062 | 
## ------------------------------|-----------|-----------|-----------|
##                         11/FA |         9 |        96 |       105 | 
##                               |     0.954 |     0.128 |           | 
##                               |     0.086 |     0.914 |     0.058 | 
## ------------------------------|-----------|-----------|-----------|
##                         12/FA |        14 |        91 |       105 | 
##                               |     0.194 |     0.026 |           | 
##                               |     0.133 |     0.867 |     0.058 | 
## ------------------------------|-----------|-----------|-----------|
##                         13/FA |        11 |        98 |       109 | 
##                               |     0.285 |     0.038 |           | 
##                               |     0.101 |     0.899 |     0.060 | 
## ------------------------------|-----------|-----------|-----------|
##                         14/FA |         8 |       129 |       137 | 
##                               |     4.179 |     0.562 |           | 
##                               |     0.058 |     0.942 |     0.076 | 
## ------------------------------|-----------|-----------|-----------|
##                         15/FA |        29 |       192 |       221 | 
##                               |     0.301 |     0.040 |           | 
##                               |     0.131 |     0.869 |     0.122 | 
## ------------------------------|-----------|-----------|-----------|
##                         16/FA |        26 |       206 |       232 | 
##                               |     0.082 |     0.011 |           | 
##                               |     0.112 |     0.888 |     0.128 | 
## ------------------------------|-----------|-----------|-----------|
##                         17/FA |        26 |       186 |       212 | 
##                               |     0.030 |     0.004 |           | 
##                               |     0.123 |     0.877 |     0.117 | 
## ------------------------------|-----------|-----------|-----------|
##                         18/FA |        25 |       161 |       186 | 
##                               |     0.396 |     0.053 |           | 
##                               |     0.134 |     0.866 |     0.103 | 
## ------------------------------|-----------|-----------|-----------|
##                         19/FA |        25 |       201 |       226 | 
##                               |     0.119 |     0.016 |           | 
##                               |     0.111 |     0.889 |     0.125 | 
## ------------------------------|-----------|-----------|-----------|
##                         20/FA |        34 |       135 |       169 | 
##                               |     9.743 |     1.310 |           | 
##                               |     0.201 |     0.799 |     0.093 | 
## ------------------------------|-----------|-----------|-----------|
##                  Column Total |       215 |      1599 |      1814 | 
## ------------------------------|-----------|-----------|-----------|
## 
## 
write.csv(EnglishFirst,"englishFirst.csv")
write.csv(EnglishPass, "englishPass.csv")
write.csv(EnglishFT, "englFTPass.csv")
mathdescribe<- describeBy(MathC_Term, MathC_Term$Col_Math_Term)
mathdescribe<- do.call("rbind", mathdescribe)
mathdescribe
##                           vars   n  mean    sd median trimmed   mad   min   max
## 10/FA.Col_Math_Term*         1 180  1.00  0.00   1.00    1.00  0.00  1.00  1.00
## 10/FA.College_Math_Pass      2 180  0.87  0.33   1.00    0.97  0.00  0.00  1.00
## 10/FA.College_Math_Grade*    3 180  2.32  1.17   2.00    2.17  1.48  1.00  5.00
## 10/FA.MathStart              4 179  0.22  0.41   0.00    0.15  0.00  0.00  1.00
## 10/FA.HSGPA                  5 130  3.14  0.59   3.23    3.20  0.57  0.86  4.00
## 10/FA.ACT_Math               6   2 26.50  0.71  26.50   26.50  0.74 26.00 27.00
## 10/FA.ALEKS                  7   0   NaN    NA     NA     NaN    NA   Inf  -Inf
## 11/FA.Col_Math_Term*         1 208  1.00  0.00   1.00    1.00  0.00  1.00  1.00
## 11/FA.College_Math_Pass      2 208  0.75  0.43   1.00    0.81  0.00  0.00  1.00
## 11/FA.College_Math_Grade*    3 208  2.73  1.39   3.00    2.66  1.48  1.00  5.00
## 11/FA.MathStart              4 205  0.21  0.41   0.00    0.14  0.00  0.00  1.00
## 11/FA.HSGPA                  5 154  3.19  0.54   3.28    3.24  0.50  1.59  4.00
## 11/FA.ACT_Math               6   0   NaN    NA     NA     NaN    NA   Inf  -Inf
## 11/FA.ALEKS                  7   1 28.00    NA  28.00   28.00  0.00 28.00 28.00
## 12/FA.Col_Math_Term*         1 171  1.00  0.00   1.00    1.00  0.00  1.00  1.00
## 12/FA.College_Math_Pass      2 171  0.73  0.45   1.00    0.78  0.00  0.00  1.00
## 12/FA.College_Math_Grade*    3 171  2.74  1.30   3.00    2.68  1.48  1.00  5.00
## 12/FA.MathStart              4 171  0.21  0.41   0.00    0.14  0.00  0.00  1.00
## 12/FA.HSGPA                  5 135  3.11  0.52   3.20    3.14  0.62  1.82  4.00
## 12/FA.ACT_Math               6   1 26.00    NA  26.00   26.00  0.00 26.00 26.00
## 12/FA.ALEKS                  7   1 36.00    NA  36.00   36.00  0.00 36.00 36.00
## 13/FA.Col_Math_Term*         1 259  1.00  0.00   1.00    1.00  0.00  1.00  1.00
## 13/FA.College_Math_Pass      2 259  0.81  0.40   1.00    0.88  0.00  0.00  1.00
## 13/FA.College_Math_Grade*    3 259  2.56  1.30   2.00    2.45  1.48  1.00  5.00
## 13/FA.MathStart              4 258  0.25  0.43   0.00    0.19  0.00  0.00  1.00
## 13/FA.HSGPA                  5 201  3.10  0.55   3.16    3.13  0.61  1.34  4.00
## 13/FA.ACT_Math               6   2 21.50  3.54  21.50   21.50  3.71 19.00 24.00
## 13/FA.ALEKS                  7   1 39.00    NA  39.00   39.00  0.00 39.00 39.00
## 14/FA.Col_Math_Term*         1 242  1.00  0.00   1.00    1.00  0.00  1.00  1.00
## 14/FA.College_Math_Pass      2 242  0.87  0.34   1.00    0.96  0.00  0.00  1.00
## 14/FA.College_Math_Grade*    3 242  2.29  1.19   2.00    2.15  1.48  1.00  5.00
## 14/FA.MathStart              4 242  0.26  0.44   0.00    0.20  0.00  0.00  1.00
## 14/FA.HSGPA                  5 200  3.21  0.52   3.28    3.24  0.52  1.71  4.09
## 14/FA.ACT_Math               6  71 23.34  3.06  24.00   23.49  2.97 15.00 31.00
## 14/FA.ALEKS                  7   0   NaN    NA     NA     NaN    NA   Inf  -Inf
## 15/FA.Col_Math_Term*         1 342  1.00  0.00   1.00    1.00  0.00  1.00  1.00
## 15/FA.College_Math_Pass      2 342  0.85  0.36   1.00    0.93  0.00  0.00  1.00
## 15/FA.College_Math_Grade*    3 342  2.32  1.25   2.00    2.15  1.48  1.00  5.00
## 15/FA.MathStart              4 342  0.23  0.42   0.00    0.16  0.00  0.00  1.00
## 15/FA.HSGPA                  5 281  3.00  0.56   3.04    3.02  0.59  1.41  4.81
## 15/FA.ACT_Math               6 108 20.64  3.61  21.00   20.61  4.45 13.00 28.00
## 15/FA.ALEKS                  7   3 38.33  1.53  38.00   38.33  1.48 37.00 40.00
## 16/FA.Col_Math_Term*         1 318  1.00  0.00   1.00    1.00  0.00  1.00  1.00
## 16/FA.College_Math_Pass      2 318  0.83  0.38   1.00    0.91  0.00  0.00  1.00
## 16/FA.College_Math_Grade*    3 318  2.35  1.33   2.00    2.19  1.48  1.00  5.00
## 16/FA.MathStart              4 318  0.46  0.50   0.00    0.45  0.00  0.00  1.00
## 16/FA.HSGPA                  5 273  3.19  0.49   3.26    3.23  0.45  1.29  4.00
## 16/FA.ACT_Math               6 171 20.09  3.31  20.00   19.91  4.45 15.00 30.00
## 16/FA.ALEKS                  7  48 48.98 17.73  47.50   48.65 20.02 14.00 81.00
## 17/FA.Col_Math_Term*         1 269  1.00  0.00   1.00    1.00  0.00  1.00  1.00
## 17/FA.College_Math_Pass      2 269  0.85  0.36   1.00    0.93  0.00  0.00  1.00
## 17/FA.College_Math_Grade*    3 269  2.24  1.28   2.00    2.06  1.48  1.00  5.00
## 17/FA.MathStart              4 269  0.44  0.50   0.00    0.42  0.00  0.00  1.00
## 17/FA.HSGPA                  5 242  3.21  0.47   3.28    3.25  0.43  1.62  4.02
## 17/FA.ACT_Math               6 177 20.89  3.35  21.00   20.82  4.45 15.00 29.00
## 17/FA.ALEKS                  7  44 46.55 17.38  47.00   45.89 14.83 14.00 94.00
## 18/FA.Col_Math_Term*         1 234  1.00  0.00   1.00    1.00  0.00  1.00  1.00
## 18/FA.College_Math_Pass      2 234  0.84  0.37   1.00    0.93  0.00  0.00  1.00
## 18/FA.College_Math_Grade*    3 234  2.28  1.25   2.00    2.11  1.48  1.00  5.00
## 18/FA.MathStart              4 234  0.50  0.50   0.00    0.49  0.00  0.00  1.00
## 18/FA.HSGPA                  5 219  3.23  0.46   3.27    3.26  0.41  1.66  4.00
## 18/FA.ACT_Math               6 143 20.53  3.76  20.00   20.41  4.45 14.00 28.00
## 18/FA.ALEKS                  7  27 41.70 19.03  46.00   42.00 14.83  5.00 82.00
## 19/FA.Col_Math_Term*         1 241  1.00  0.00   1.00    1.00  0.00  1.00  1.00
## 19/FA.College_Math_Pass      2 241  0.78  0.42   1.00    0.85  0.00  0.00  1.00
## 19/FA.College_Math_Grade*    3 241  2.45  1.42   2.00    2.31  1.48  1.00  5.00
## 19/FA.MathStart              4 241  0.54  0.50   1.00    0.55  0.00  0.00  1.00
## 19/FA.HSGPA                  5 234  3.22  0.51   3.30    3.27  0.39  1.26  4.02
## 19/FA.ACT_Math               6 144 20.58  4.12  20.00   20.33  4.45 13.00 33.00
## 19/FA.ALEKS                  7  41 30.20 14.52  29.00   28.91 13.34  7.00 67.00
## 20/FA.Col_Math_Term*         1 351  1.00  0.00   1.00    1.00  0.00  1.00  1.00
## 20/FA.College_Math_Pass      2 351  0.77  0.42   1.00    0.84  0.00  0.00  1.00
## 20/FA.College_Math_Grade*    3 351  2.56  1.43   2.00    2.45  1.48  1.00  5.00
## 20/FA.MathStart              4 351  0.44  0.50   0.00    0.42  0.00  0.00  1.00
## 20/FA.HSGPA                  5 324  3.02  0.60   3.04    3.05  0.72  1.28  4.20
## 20/FA.ACT_Math               6 189 19.20  3.81  18.00   18.86  2.97 11.00 32.00
## 20/FA.ALEKS                  7  76 20.50 14.76  17.00   18.34 11.86  4.00 86.00
##                           range  skew kurtosis   se
## 10/FA.Col_Math_Term*       0.00   NaN      NaN 0.00
## 10/FA.College_Math_Pass    1.00 -2.21     2.91 0.02
## 10/FA.College_Math_Grade*  4.00  0.79    -0.01 0.09
## 10/FA.MathStart            1.00  1.36    -0.16 0.03
## 10/FA.HSGPA                3.14 -1.00     1.16 0.05
## 10/FA.ACT_Math             1.00  0.00    -2.75 0.50
## 10/FA.ALEKS                -Inf    NA       NA   NA
## 11/FA.Col_Math_Term*       0.00   NaN      NaN 0.00
## 11/FA.College_Math_Pass    1.00 -1.15    -0.69 0.03
## 11/FA.College_Math_Grade*  4.00  0.41    -1.03 0.10
## 11/FA.MathStart            1.00  1.42     0.00 0.03
## 11/FA.HSGPA                2.41 -0.71    -0.17 0.04
## 11/FA.ACT_Math             -Inf    NA       NA   NA
## 11/FA.ALEKS                0.00    NA       NA   NA
## 12/FA.Col_Math_Term*       0.00   NaN      NaN 0.00
## 12/FA.College_Math_Pass    1.00 -1.00    -1.01 0.03
## 12/FA.College_Math_Grade*  4.00  0.30    -0.97 0.10
## 12/FA.MathStart            1.00  1.41    -0.02 0.03
## 12/FA.HSGPA                2.18 -0.38    -0.66 0.05
## 12/FA.ACT_Math             0.00    NA       NA   NA
## 12/FA.ALEKS                0.00    NA       NA   NA
## 13/FA.Col_Math_Term*       0.00   NaN      NaN 0.00
## 13/FA.College_Math_Pass    1.00 -1.55     0.39 0.02
## 13/FA.College_Math_Grade*  4.00  0.59    -0.63 0.08
## 13/FA.MathStart            1.00  1.14    -0.71 0.03
## 13/FA.HSGPA                2.66 -0.40    -0.45 0.04
## 13/FA.ACT_Math             5.00  0.00    -2.75 2.50
## 13/FA.ALEKS                0.00    NA       NA   NA
## 14/FA.Col_Math_Term*       0.00   NaN      NaN 0.00
## 14/FA.College_Math_Pass    1.00 -2.16     2.67 0.02
## 14/FA.College_Math_Grade*  4.00  0.65    -0.36 0.08
## 14/FA.MathStart            1.00  1.09    -0.82 0.03
## 14/FA.HSGPA                2.38 -0.56    -0.32 0.04
## 14/FA.ACT_Math            16.00 -0.48     0.20 0.36
## 14/FA.ALEKS                -Inf    NA       NA   NA
## 15/FA.Col_Math_Term*       0.00   NaN      NaN 0.00
## 15/FA.College_Math_Pass    1.00 -1.90     1.61 0.02
## 15/FA.College_Math_Grade*  4.00  0.79    -0.28 0.07
## 15/FA.MathStart            1.00  1.29    -0.34 0.02
## 15/FA.HSGPA                3.40 -0.22    -0.14 0.03
## 15/FA.ACT_Math            15.00 -0.04    -1.01 0.35
## 15/FA.ALEKS                3.00  0.21    -2.33 0.88
## 16/FA.Col_Math_Term*       0.00   NaN      NaN 0.00
## 16/FA.College_Math_Pass    1.00 -1.72     0.97 0.02
## 16/FA.College_Math_Grade*  4.00  0.75    -0.52 0.07
## 16/FA.MathStart            1.00  0.18    -1.98 0.03
## 16/FA.HSGPA                2.71 -0.83     0.85 0.03
## 16/FA.ACT_Math            15.00  0.46    -0.50 0.25
## 16/FA.ALEKS               67.00  0.22    -0.93 2.56
## 17/FA.Col_Math_Term*       0.00   NaN      NaN 0.00
## 17/FA.College_Math_Pass    1.00 -1.92     1.71 0.02
## 17/FA.College_Math_Grade*  4.00  0.91    -0.16 0.08
## 17/FA.MathStart            1.00  0.25    -1.95 0.03
## 17/FA.HSGPA                2.40 -0.73     0.48 0.03
## 17/FA.ACT_Math            14.00  0.16    -0.94 0.25
## 17/FA.ALEKS               80.00  0.34     0.17 2.62
## 18/FA.Col_Math_Term*       0.00   NaN      NaN 0.00
## 18/FA.College_Math_Pass    1.00 -1.86     1.47 0.02
## 18/FA.College_Math_Grade*  4.00  0.78    -0.35 0.08
## 18/FA.MathStart            1.00  0.02    -2.01 0.03
## 18/FA.HSGPA                2.34 -0.66     0.50 0.03
## 18/FA.ACT_Math            14.00  0.18    -1.24 0.31
## 18/FA.ALEKS               77.00 -0.14    -0.60 3.66
## 19/FA.Col_Math_Term*       0.00   NaN      NaN 0.00
## 19/FA.College_Math_Pass    1.00 -1.34    -0.19 0.03
## 19/FA.College_Math_Grade*  4.00  0.66    -0.86 0.09
## 19/FA.MathStart            1.00 -0.17    -1.98 0.03
## 19/FA.HSGPA                2.77 -0.99     1.30 0.03
## 19/FA.ACT_Math            20.00  0.49    -0.53 0.34
## 19/FA.ALEKS               60.00  0.77     0.12 2.27
## 20/FA.Col_Math_Term*       0.00   NaN      NaN 0.00
## 20/FA.College_Math_Pass    1.00 -1.29    -0.33 0.02
## 20/FA.College_Math_Grade*  4.00  0.54    -0.97 0.08
## 20/FA.MathStart            1.00  0.26    -1.94 0.03
## 20/FA.HSGPA                2.92 -0.29    -0.69 0.03
## 20/FA.ACT_Math            21.00  0.79     0.42 0.28
## 20/FA.ALEKS               82.00  1.95     5.14 1.69
write.csv(mathdescribe, "mathdescribe.csv")

engldescribe<- describeBy(EnglC_Term, EnglC_Term$Col_Eng_Term)
engldescribe<- do.call("rbind", engldescribe)
engldescribe
##                              vars   n   mean    sd median trimmed   mad    min
## 10/FA.Col_Eng_Term*             1 261   1.00  0.00   1.00    1.00  0.00   1.00
## 10/FA.College_English_Pass      2 261   0.94  0.23   1.00    1.00  0.00   0.00
## 10/FA.College_English_Grade*    3 261   1.94  1.05   2.00    1.80  1.48   1.00
## 10/FA.EnglishStart              4 261   0.43  0.50   0.00    0.41  0.00   0.00
## 10/FA.HSGPA                     5 229   3.04  0.52   3.10    3.06  0.57   1.57
## 10/FA.ACT_Engl                  6   3  19.33  2.08  20.00   19.33  1.48  17.00
## 10/FA.ACT_Reading               7   3  19.67  3.06  19.00   19.67  2.97  17.00
## 10/FA.McCann_R                  8   0    NaN    NA     NA     NaN    NA    Inf
## 10/FA.McCann_W                  9   0    NaN    NA     NA     NaN    NA    Inf
## 11/FA.Col_Eng_Term*             1 254   1.00  0.00   1.00    1.00  0.00   1.00
## 11/FA.College_English_Pass      2 254   0.92  0.27   1.00    1.00  0.00   0.00
## 11/FA.College_English_Grade*    3 254   1.93  1.07   2.00    1.75  1.48   1.00
## 11/FA.EnglishStart              4 253   0.42  0.49   0.00    0.39  0.00   0.00
## 11/FA.HSGPA                     5 230   3.13  0.52   3.18    3.15  0.50   1.66
## 11/FA.ACT_Engl                  6   2  15.50  2.12  15.50   15.50  2.22  14.00
## 11/FA.ACT_Reading               7   2  18.00  1.41  18.00   18.00  1.48  17.00
## 11/FA.McCann_R                  8   3 114.67  4.62 112.00  114.67  0.00 112.00
## 11/FA.McCann_W                  9   1   6.00    NA   6.00    6.00  0.00   6.00
## 12/FA.Col_Eng_Term*             1 225   1.00  0.00   1.00    1.00  0.00   1.00
## 12/FA.College_English_Pass      2 225   0.90  0.30   1.00    0.99  0.00   0.00
## 12/FA.College_English_Grade*    3 225   2.09  1.16   2.00    1.90  1.48   1.00
## 12/FA.EnglishStart              4 225   0.47  0.50   0.00    0.46  0.00   0.00
## 12/FA.HSGPA                     5 189   3.09  0.51   3.13    3.11  0.54   1.62
## 12/FA.ACT_Engl                  6   3  20.33  2.89  22.00   20.33  0.00  17.00
## 12/FA.ACT_Reading               7   3  21.67  1.15  21.00   21.67  0.00  21.00
## 12/FA.McCann_R                  8   1 112.00    NA 112.00  112.00  0.00 112.00
## 12/FA.McCann_W                  9   0    NaN    NA     NA     NaN    NA    Inf
## 13/FA.Col_Eng_Term*             1 219   1.00  0.00   1.00    1.00  0.00   1.00
## 13/FA.College_English_Pass      2 219   0.91  0.29   1.00    1.00  0.00   0.00
## 13/FA.College_English_Grade*    3 219   2.10  1.13   2.00    1.90  1.48   1.00
## 13/FA.EnglishStart              4 219   0.50  0.50   0.00    0.50  0.00   0.00
## 13/FA.HSGPA                     5 196   3.10  0.51   3.19    3.12  0.58   1.87
## 13/FA.ACT_Engl                  6  15  23.73  4.61  22.00   23.46  2.97  18.00
## 13/FA.ACT_Reading               7  15  24.87  4.05  23.00   24.46  1.48  19.00
## 13/FA.McCann_R                  8   1 150.00    NA 150.00  150.00  0.00 150.00
## 13/FA.McCann_W                  9   0    NaN    NA     NA     NaN    NA    Inf
## 14/FA.Col_Eng_Term*             1 254   1.00  0.00   1.00    1.00  0.00   1.00
## 14/FA.College_English_Pass      2 254   0.93  0.26   1.00    1.00  0.00   0.00
## 14/FA.College_English_Grade*    3 254   1.93  1.05   2.00    1.76  1.48   1.00
## 14/FA.EnglishStart              4 254   0.54  0.50   1.00    0.55  0.00   0.00
## 14/FA.HSGPA                     5 240   3.04  0.59   3.13    3.06  0.63   1.51
## 14/FA.ACT_Engl                  6 136  21.12  3.72  21.00   21.01  2.97  13.00
## 14/FA.ACT_Reading               7 137  21.55  4.09  21.00   21.39  4.45  12.00
## 14/FA.McCann_R                  8   0    NaN    NA     NA     NaN    NA    Inf
## 14/FA.McCann_W                  9   0    NaN    NA     NA     NaN    NA    Inf
## 15/FA.Col_Eng_Term*             1 366   1.00  0.00   1.00    1.00  0.00   1.00
## 15/FA.College_English_Pass      2 366   0.85  0.36   1.00    0.94  0.00   0.00
## 15/FA.College_English_Grade*    3 366   2.25  1.29   2.00    2.06  1.48   1.00
## 15/FA.EnglishStart              4 366   0.60  0.49   1.00    0.63  0.00   0.00
## 15/FA.HSGPA                     5 318   2.94  0.56   2.97    2.96  0.63   1.50
## 15/FA.ACT_Engl                  6 211  19.76  4.21  20.00   19.66  2.97  11.00
## 15/FA.ACT_Reading               7 211  21.21  4.31  21.00   21.07  4.45  10.00
## 15/FA.McCann_R                  8   2 109.50  4.95 109.50  109.50  5.19 106.00
## 15/FA.McCann_W                  9   1   4.00    NA   4.00    4.00  0.00   4.00
## 16/FA.Col_Eng_Term*             1 358   1.00  0.00   1.00    1.00  0.00   1.00
## 16/FA.College_English_Pass      2 358   0.86  0.35   1.00    0.94  0.00   0.00
## 16/FA.College_English_Grade*    3 358   2.25  1.30   2.00    2.07  1.48   1.00
## 16/FA.EnglishStart              4 358   0.65  0.48   1.00    0.68  0.00   0.00
## 16/FA.HSGPA                     5 315   2.93  0.55   2.97    2.95  0.55   1.00
## 16/FA.ACT_Engl                  6 227  18.97  4.19  19.00   18.94  4.45   7.00
## 16/FA.ACT_Reading               7 228  20.41  4.40  20.00   20.27  4.45  11.00
## 16/FA.McCann_R                  8 121 101.45 11.46 100.00  100.87  8.90  74.00
## 16/FA.McCann_W                  9 121   4.88  0.70   5.00    4.86  0.00   3.00
## 17/FA.Col_Eng_Term*             1 343   1.00  0.00   1.00    1.00  0.00   1.00
## 17/FA.College_English_Pass      2 343   0.87  0.33   1.00    0.96  0.00   0.00
## 17/FA.College_English_Grade*    3 343   2.19  1.24   2.00    1.99  1.48   1.00
## 17/FA.EnglishStart              4 343   0.62  0.49   1.00    0.65  0.00   0.00
## 17/FA.HSGPA                     5 321   2.92  0.53   2.98    2.93  0.60   1.34
## 17/FA.ACT_Engl                  6 229  18.70  4.65  19.00   18.56  4.45   8.00
## 17/FA.ACT_Reading               7 229  19.96  4.81  20.00   19.70  4.45  10.00
## 17/FA.McCann_R                  8 167  99.47 12.91  99.00   99.12 13.34  64.00
## 17/FA.McCann_W                  9 161   4.76  0.74   5.00    4.75  0.00   3.00
## 18/FA.Col_Eng_Term*             1 294   1.00  0.00   1.00    1.00  0.00   1.00
## 18/FA.College_English_Pass      2 294   0.88  0.33   1.00    0.97  0.00   0.00
## 18/FA.College_English_Grade*    3 294   2.19  1.24   2.00    1.99  1.48   1.00
## 18/FA.EnglishStart              4 294   0.63  0.48   1.00    0.67  0.00   0.00
## 18/FA.HSGPA                     5 272   2.90  0.54   2.92    2.90  0.54   1.44
## 18/FA.ACT_Engl                  6 173  18.75  4.66  19.00   18.71  4.45   2.00
## 18/FA.ACT_Reading               7 170  20.72  4.93  21.00   20.47  4.45   9.00
## 18/FA.McCann_R                  8 159 101.03 13.91 100.00  100.18 10.38  64.00
## 18/FA.McCann_W                  9 159   4.87  0.86   5.00    4.88  1.48   3.00
## 19/FA.Col_Eng_Term*             1 325   1.00  0.00   1.00    1.00  0.00   1.00
## 19/FA.College_English_Pass      2 325   0.89  0.31   1.00    0.99  0.00   0.00
## 19/FA.College_English_Grade*    3 325   2.16  1.17   2.00    1.97  1.48   1.00
## 19/FA.EnglishStart              4 324   0.70  0.46   1.00    0.75  0.00   0.00
## 19/FA.HSGPA                     5 308   3.02  0.55   3.04    3.03  0.57   1.42
## 19/FA.ACT_Engl                  6 191  18.52  4.39  18.00   18.33  4.45  10.00
## 19/FA.ACT_Reading               7 191  20.45  4.99  20.00   20.06  4.45  12.00
## 19/FA.McCann_R                  8  83  98.31 15.12  98.00   97.97 11.86  50.00
## 19/FA.McCann_W                  9  34   4.44  1.13   5.00    4.50  1.48   2.00
## 20/FA.Col_Eng_Term*             1 238   1.00  0.00   1.00    1.00  0.00   1.00
## 20/FA.College_English_Pass      2 238   0.82  0.39   1.00    0.89  0.00   0.00
## 20/FA.College_English_Grade*    3 238   2.35  1.39   2.00    2.19  1.48   1.00
## 20/FA.EnglishStart              4 238   0.71  0.45   1.00    0.76  0.00   0.00
## 20/FA.HSGPA                     5 228   2.94  0.56   2.97    2.95  0.55   1.50
## 20/FA.ACT_Engl                  6 134  18.09  4.14  18.00   17.96  4.45  11.00
## 20/FA.ACT_Reading               7 134  19.64  4.14  20.00   19.55  4.45  10.00
## 20/FA.McCann_R                  8  27 100.37 15.78 100.00  100.91 11.86  61.00
## 20/FA.McCann_W                  9  16   4.38  0.96   4.50    4.43  0.74   2.00
##                                 max  range  skew kurtosis   se
## 10/FA.Col_Eng_Term*            1.00   0.00   NaN      NaN 0.00
## 10/FA.College_English_Pass     1.00   1.00 -3.78    12.34 0.01
## 10/FA.College_English_Grade*   5.00   4.00  1.02     0.62 0.06
## 10/FA.EnglishStart             1.00   1.00  0.28    -1.93 0.03
## 10/FA.HSGPA                    4.00   2.43 -0.35    -0.46 0.03
## 10/FA.ACT_Engl                21.00   4.00 -0.29    -2.33 1.20
## 10/FA.ACT_Reading             23.00   6.00  0.21    -2.33 1.76
## 10/FA.McCann_R                 -Inf   -Inf    NA       NA   NA
## 10/FA.McCann_W                 -Inf   -Inf    NA       NA   NA
## 11/FA.Col_Eng_Term*            1.00   0.00   NaN      NaN 0.00
## 11/FA.College_English_Pass     1.00   1.00 -3.11     7.70 0.02
## 11/FA.College_English_Grade*   5.00   4.00  1.31     1.37 0.07
## 11/FA.EnglishStart             1.00   1.00  0.34    -1.89 0.03
## 11/FA.HSGPA                    4.00   2.34 -0.45    -0.25 0.03
## 11/FA.ACT_Engl                17.00   3.00  0.00    -2.75 1.50
## 11/FA.ACT_Reading             19.00   2.00  0.00    -2.75 1.00
## 11/FA.McCann_R               120.00   8.00  0.38    -2.33 2.67
## 11/FA.McCann_W                 6.00   0.00    NA       NA   NA
## 12/FA.Col_Eng_Term*            1.00   0.00   NaN      NaN 0.00
## 12/FA.College_English_Pass     1.00   1.00 -2.61     4.83 0.02
## 12/FA.College_English_Grade*   5.00   4.00  1.10     0.58 0.08
## 12/FA.EnglishStart             1.00   1.00  0.13    -1.99 0.03
## 12/FA.HSGPA                    4.00   2.38 -0.35    -0.54 0.04
## 12/FA.ACT_Engl                22.00   5.00 -0.38    -2.33 1.67
## 12/FA.ACT_Reading             23.00   2.00  0.38    -2.33 0.67
## 12/FA.McCann_R               112.00   0.00    NA       NA   NA
## 12/FA.McCann_W                 -Inf   -Inf    NA       NA   NA
## 13/FA.Col_Eng_Term*            1.00   0.00   NaN      NaN 0.00
## 13/FA.College_English_Pass     1.00   1.00 -2.82     5.97 0.02
## 13/FA.College_English_Grade*   5.00   4.00  1.23     1.06 0.08
## 13/FA.EnglishStart             1.00   1.00  0.01    -2.01 0.03
## 13/FA.HSGPA                    4.00   2.13 -0.39    -0.71 0.04
## 13/FA.ACT_Engl                33.00  15.00  0.92    -0.43 1.19
## 13/FA.ACT_Reading             36.00  17.00  1.35     1.48 1.05
## 13/FA.McCann_R               150.00   0.00    NA       NA   NA
## 13/FA.McCann_W                 -Inf   -Inf    NA       NA   NA
## 14/FA.Col_Eng_Term*            1.00   0.00   NaN      NaN 0.00
## 14/FA.College_English_Pass     1.00   1.00 -3.33     9.09 0.02
## 14/FA.College_English_Grade*   5.00   4.00  1.29     1.41 0.07
## 14/FA.EnglishStart             1.00   1.00 -0.16    -1.98 0.03
## 14/FA.HSGPA                    4.39   2.88 -0.28    -0.66 0.04
## 14/FA.ACT_Engl                35.00  22.00  0.56     1.45 0.32
## 14/FA.ACT_Reading             33.00  21.00  0.45     0.26 0.35
## 14/FA.McCann_R                 -Inf   -Inf    NA       NA   NA
## 14/FA.McCann_W                 -Inf   -Inf    NA       NA   NA
## 15/FA.Col_Eng_Term*            1.00   0.00   NaN      NaN 0.00
## 15/FA.College_English_Pass     1.00   1.00 -1.98     1.92 0.02
## 15/FA.College_English_Grade*   6.00   5.00  0.99     0.03 0.07
## 15/FA.EnglishStart             1.00   1.00 -0.42    -1.83 0.03
## 15/FA.HSGPA                    4.47   2.97 -0.19    -0.46 0.03
## 15/FA.ACT_Engl                32.00  21.00  0.21     0.03 0.29
## 15/FA.ACT_Reading             35.00  25.00  0.33     0.12 0.30
## 15/FA.McCann_R               113.00   7.00  0.00    -2.75 3.50
## 15/FA.McCann_W                 4.00   0.00    NA       NA   NA
## 16/FA.Col_Eng_Term*            1.00   0.00   NaN      NaN 0.00
## 16/FA.College_English_Pass     1.00   1.00 -2.04     2.16 0.02
## 16/FA.College_English_Grade*   5.00   4.00  0.91    -0.17 0.07
## 16/FA.EnglishStart             1.00   1.00 -0.62    -1.62 0.03
## 16/FA.HSGPA                    4.00   3.00 -0.29    -0.16 0.03
## 16/FA.ACT_Engl                32.00  25.00  0.07     0.38 0.28
## 16/FA.ACT_Reading             31.00  20.00  0.25    -0.34 0.29
## 16/FA.McCann_R               150.00  76.00  0.78     2.10 1.04
## 16/FA.McCann_W                 6.00   3.00  0.03    -0.68 0.06
## 17/FA.Col_Eng_Term*            1.00   0.00   NaN      NaN 0.00
## 17/FA.College_English_Pass     1.00   1.00 -2.21     2.91 0.02
## 17/FA.College_English_Grade*   5.00   4.00  1.05     0.24 0.07
## 17/FA.EnglishStart             1.00   1.00 -0.48    -1.77 0.03
## 17/FA.HSGPA                    4.00   2.66 -0.11    -0.62 0.03
## 17/FA.ACT_Engl                36.00  28.00  0.41     0.37 0.31
## 17/FA.ACT_Reading             36.00  26.00  0.51     0.14 0.32
## 17/FA.McCann_R               150.00  86.00  0.39     0.69 1.00
## 17/FA.McCann_W                 6.00   3.00 -0.23    -0.20 0.06
## 18/FA.Col_Eng_Term*            1.00   0.00   NaN      NaN 0.00
## 18/FA.College_English_Pass     1.00   1.00 -2.29     3.26 0.02
## 18/FA.College_English_Grade*   5.00   4.00  1.03     0.23 0.07
## 18/FA.EnglishStart             1.00   1.00 -0.55    -1.71 0.03
## 18/FA.HSGPA                    4.00   2.56 -0.08    -0.55 0.03
## 18/FA.ACT_Engl                34.00  32.00  0.09     1.11 0.35
## 18/FA.ACT_Reading             35.00  26.00  0.43     0.01 0.38
## 18/FA.McCann_R               150.00  86.00  0.91     2.54 1.10
## 18/FA.McCann_W                 6.00   3.00 -0.11    -0.99 0.07
## 19/FA.Col_Eng_Term*            1.00   0.00   NaN      NaN 0.00
## 19/FA.College_English_Pass     1.00   1.00 -2.52     4.36 0.02
## 19/FA.College_English_Grade*   6.00   5.00  1.07     0.60 0.06
## 19/FA.EnglishStart             1.00   1.00 -0.86    -1.27 0.03
## 19/FA.HSGPA                    4.01   2.59 -0.25    -0.47 0.03
## 19/FA.ACT_Engl                33.00  23.00  0.48     0.09 0.32
## 19/FA.ACT_Reading             35.00  23.00  0.66    -0.06 0.36
## 19/FA.McCann_R               150.00 100.00  0.47     2.64 1.66
## 19/FA.McCann_W                 6.00   4.00 -0.40    -0.69 0.19
## 20/FA.Col_Eng_Term*            1.00   0.00   NaN      NaN 0.00
## 20/FA.College_English_Pass     1.00   1.00 -1.61     0.61 0.03
## 20/FA.College_English_Grade*   5.00   4.00  0.84    -0.54 0.09
## 20/FA.EnglishStart             1.00   1.00 -0.92    -1.16 0.03
## 20/FA.HSGPA                    4.00   2.50 -0.13    -0.52 0.04
## 20/FA.ACT_Engl                33.00  22.00  0.45     0.17 0.36
## 20/FA.ACT_Reading             32.00  22.00  0.26    -0.03 0.36
## 20/FA.McCann_R               130.00  69.00 -0.44     0.08 3.04
## 20/FA.McCann_W                 6.00   4.00 -0.73     0.24 0.24
write.csv(engldescribe, "engdescrible.csv")
math_pass_tbl<- describeBy(MathC_Term, MathC_Term$College_Math_Pass)
math_pass_tbl<- do.call("rbind", math_pass_tbl)
math_pass_tbl
##                       vars    n  mean    sd median trimmed   mad   min   max
## 0.Col_Math_Term*         1  523  6.50  3.20   7.00    6.56  4.45  1.00 11.00
## 0.College_Math_Pass      2  523  0.00  0.00   0.00    0.00  0.00  0.00  0.00
## 0.College_Math_Grade*    3  523  1.69  0.46   2.00    1.73  0.00  1.00  2.00
## 0.MathStart              4  522  0.39  0.49   0.00    0.36  0.00  0.00  1.00
## 0.HSGPA                  5  460  2.94  0.50   3.00    2.97  0.47  1.34  4.00
## 0.ACT_Math               6  201 19.93  3.66  19.00   19.83  4.45 12.00 27.00
## 0.ALEKS                  7   49 32.08 19.23  27.00   29.95 13.34  5.00 94.00
## 1.Col_Math_Term*         1 2292  6.44  3.02   7.00    6.51  2.97  1.00 11.00
## 1.College_Math_Pass      2 2292  1.00  0.00   1.00    1.00  0.00  1.00  1.00
## 1.College_Math_Grade*    3 2292  1.91  0.81   2.00    1.89  1.48  1.00  3.00
## 1.MathStart              4 2288  0.34  0.47   0.00    0.30  0.00  0.00  1.00
## 1.HSGPA                  5 1933  3.19  0.53   3.27    3.23  0.52  0.86  4.81
## 1.ACT_Math               6  807 20.65  3.75  20.00   20.49  4.45 11.00 33.00
## 1.ALEKS                  7  193 36.10 20.03  34.00   35.03 23.72  4.00 86.00
##                       range  skew kurtosis   se
## 0.Col_Math_Term*      10.00 -0.07    -1.28 0.14
## 0.College_Math_Pass    0.00   NaN      NaN 0.00
## 0.College_Math_Grade*  1.00 -0.80    -1.36 0.02
## 0.MathStart            1.00  0.47    -1.78 0.02
## 0.HSGPA                2.66 -0.40    -0.08 0.02
## 0.ACT_Math            15.00  0.16    -1.13 0.26
## 0.ALEKS               89.00  1.21     1.33 2.75
## 1.Col_Math_Term*      10.00 -0.15    -1.00 0.06
## 1.College_Math_Pass    0.00   NaN      NaN 0.00
## 1.College_Math_Grade*  2.00  0.16    -1.44 0.02
## 1.MathStart            1.00  0.66    -1.57 0.01
## 1.HSGPA                3.95 -0.72     0.27 0.01
## 1.ACT_Math            22.00  0.32    -0.62 0.13
## 1.ALEKS               82.00  0.36    -0.65 1.44
write.csv(math_pass_tbl, "math_pass_table.csv")

eng_pass_table<- describeBy(EnglC_Term, EnglC_Term$College_English_Pass)
eng_pass_table<- do.call("rbind", eng_pass_table)
eng_pass_table
##                          vars    n   mean    sd median trimmed   mad   min
## 0.Col_Eng_Term*             1  360   6.90  2.85   7.00    7.05  2.97  1.00
## 0.College_English_Pass      2  360   0.00  0.00   0.00    0.00  0.00  0.00
## 0.College_English_Grade*    3  360   1.81  0.41   2.00    1.88  0.00  1.00
## 0.EnglishStart              4  360   0.60  0.49   1.00    0.62  0.00  0.00
## 0.HSGPA                     5  331   2.67  0.51   2.67    2.67  0.55  1.00
## 0.ACT_Engl                  6  171  17.90  4.05  18.00   17.90  4.45  9.00
## 0.ACT_Reading               7  172  19.26  4.48  19.00   19.14  4.45  9.00
## 0.McCann_R                  8   82  95.16 12.34  95.00   95.26 10.38 61.00
## 0.McCann_W                  9   76   4.63  0.85   5.00    4.63  1.48  2.00
## 1.Col_Eng_Term*             1 2777   6.15  3.06   6.00    6.20  4.45  1.00
## 1.College_English_Pass      2 2777   1.00  0.00   1.00    1.00  0.00  1.00
## 1.College_English_Grade*    3 2777   1.79  0.76   2.00    1.74  1.48  1.00
## 1.EnglishStart              4 2775   0.58  0.49   1.00    0.60  0.00  0.00
## 1.HSGPA                     5 2515   3.04  0.54   3.07    3.05  0.57  1.34
## 1.ACT_Engl                  6 1153  19.32  4.44  20.00   19.20  4.45  2.00
## 1.ACT_Reading               7 1151  20.79  4.59  20.00   20.57  4.45 10.00
## 1.McCann_R                  8  482 101.33 13.55 101.00  100.76 11.86 50.00
## 1.McCann_W                  9  417   4.82  0.81   5.00    4.84  1.48  2.00
##                             max  range  skew kurtosis   se
## 0.Col_Eng_Term*           11.00  10.00 -0.36    -0.76 0.15
## 0.College_English_Pass     0.00   0.00   NaN      NaN 0.00
## 0.College_English_Grade*   3.00   2.00 -1.33     0.55 0.02
## 0.EnglishStart             1.00   1.00 -0.39    -1.85 0.03
## 0.HSGPA                    3.90   2.90 -0.05    -0.39 0.03
## 0.ACT_Engl                28.00  19.00 -0.01    -0.78 0.31
## 0.ACT_Reading             32.00  23.00  0.26    -0.04 0.34
## 0.McCann_R               130.00  69.00  0.00     0.78 1.36
## 0.McCann_W                 6.00   4.00 -0.15     0.00 0.10
## 1.Col_Eng_Term*           11.00  10.00 -0.15    -1.12 0.06
## 1.College_English_Pass     1.00   0.00   NaN      NaN 0.00
## 1.College_English_Grade*   3.00   2.00  0.37    -1.19 0.01
## 1.EnglishStart             1.00   1.00 -0.31    -1.91 0.01
## 1.HSGPA                    4.47   3.13 -0.29    -0.45 0.01
## 1.ACT_Engl                36.00  34.00  0.28     0.58 0.13
## 1.ACT_Reading             36.00  26.00  0.45     0.08 0.14
## 1.McCann_R               150.00 100.00  0.64     2.21 0.62
## 1.McCann_W                 6.00   4.00 -0.33    -0.09 0.04
write.csv(eng_pass_table, "eng_pass_table.csv")
library(gridExtra)
FT_Percent<- read.csv("FT_Percent.csv")
FTTrans<- read.csv("FTTrans.csv")
ft_graph<- read.csv("ft_graph.csv")
ft_graph_transpose<- read.csv("ft_graph_transpose.csv")

mytheme <- gridExtra::ttheme_default(
    core = list(fg_params=list(cex = 1)),
    colhead = list(fg_params=list(cex = 1)),
    rowhead = list(fg_params=list(cex = 1)))

tbl<- tableGrob(FTTrans, theme = mytheme)
tbl2<- tableGrob(ft_graph_transpose, theme = mytheme)

p1<- ggplot(FT_Percent, aes(x=Term, y=Percent, group = Content, color = Content)) +
geom_line()+
geom_point()+
scale_color_brewer(palette = "Dark2")+
geom_text(aes(label= scales::percent(Percent)), size = 4, color = "black", hjust = .5, vjust = -1.2)+
geom_vline(xintercept = 7, lwd=.5,colour="black")+
scale_y_continuous(label=scales::percent, limits = c(0, 1))+
ggtitle("Percent Students Passing College Level Math and English")

p2<- ggplot(ft_graph, aes(x=Term, y=Percent, group = Content, color = Content)) +
geom_line()+
geom_point()+
scale_color_brewer(palette = "Dark2")+
geom_text(aes(label= scales::percent(Percent)), size = 4, color = "black", hjust = .5, vjust = -1.2)+
geom_vline(xintercept = 7, lwd=.8,colour="black")+
scale_y_continuous(label=scales::percent, limits = c(0, .8))+
ggtitle("Percent First Time Students by Content and Term")

grid.arrange(p1, tbl, nrow = 2, heights=c(4,2))

grid.arrange(p2, tbl2, nrow = 2, heights=c(4,2))

library(apaTables)
corrtable<- Placement %>%
  select(LCCCGPA, HSGPA, ACT_Reading, ACT_Engl, ACT_Math, HSGradYears, ALEKS, McCann_W, McCann_R)
corrtable$HSGradYears<- as.numeric(corrtable$HSGradYears)
apa.cor.table(corrtable, filename = "correlations.doc")
## 
## 
## Means, standard deviations, and correlations with confidence intervals
##  
## 
##   Variable       M     SD    1          2            3           4          
##   1. LCCCGPA     2.68  0.98                                                 
##                                                                             
##   2. HSGPA       2.97  0.57  .33**                                          
##                              [.31, .35]                                     
##                                                                             
##   3. ACT_Reading 20.49 4.96  .23**      .39**                               
##                              [.19, .26] [.36, .42]                          
##                                                                             
##   4. ACT_Engl    19.09 4.71  .26**      .44**        .75**                  
##                              [.23, .30] [.41, .47]   [.73, .76]             
##                                                                             
##   5. ACT_Math    19.16 3.79  .22**      .42**        .53**       .63**      
##                              [.19, .26] [.38, .45]   [.51, .56]  [.61, .65] 
##                                                                             
##   6. HSGradYears 3.06  6.46  .12**      -.21**       .00         -.01       
##                              [.10, .14] [-.23, -.19] [-.03, .04] [-.04, .03]
##                                                                             
##   7. ALEKS       25.59 15.58 .16**      .33**        .33**       .38**      
##                              [.11, .21] [.27, .37]   [.26, .40]  [.31, .44] 
##                                                                             
##   8. McCann_W    4.63  0.97  .17**      .23**        .34**       .39**      
##                              [.11, .23] [.16, .29]   [.26, .42]  [.32, .47] 
##                                                                             
##   9. McCann_R    99.40 14.69 .28**      .22**        .48**       .52**      
##                              [.23, .33] [.16, .28]   [.41, .54]  [.45, .58] 
##                                                                             
##   5           6           7          8         
##                                                
##                                                
##                                                
##                                                
##                                                
##                                                
##                                                
##                                                
##                                                
##                                                
##                                                
##                                                
##                                                
##                                                
##   -.03                                         
##   [-.06, .01]                                  
##                                                
##   .55**       -.01                             
##   [.50, .61]  [-.07, .04]                      
##                                                
##   .27**       -.04        .19**                
##   [.19, .35]  [-.11, .02] [.12, .26]           
##                                                
##   .35**       .16**       .25**      .33**     
##   [.28, .42]  [.11, .22]  [.19, .31] [.28, .39]
##                                                
## 
## Note. M and SD are used to represent mean and standard deviation, respectively.
## Values in square brackets indicate the 95% confidence interval.
## The confidence interval is a plausible range of population correlations 
## that could have caused the sample correlation (Cumming, 2014).
##  * indicates p < .05. ** indicates p < .01.
## 
##Point biserial with English
with(Placement, cor.test(LCCCGPA, College_English_Pass))
## 
##  Pearson's product-moment correlation
## 
## data:  LCCCGPA and College_English_Pass
## t = 54.783, df = 4997, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.5949416 0.6295914
## sample estimates:
##       cor 
## 0.6125607
with(Placement, cor.test(HSGPA, College_English_Pass))
## 
##  Pearson's product-moment correlation
## 
## data:  HSGPA and College_English_Pass
## t = 13.421, df = 4477, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1683540 0.2246647
## sample estimates:
##       cor 
## 0.1966715
with(Placement, cor.test(ACT_Engl, College_English_Pass))
## 
##  Pearson's product-moment correlation
## 
## data:  ACT_Engl and College_English_Pass
## t = 5.6924, df = 1954, p-value = 1.442e-08
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.08387532 0.17107467
## sample estimates:
##       cor 
## 0.1277218
with(Placement, cor.test(ACT_Reading, College_English_Pass))
## 
##  Pearson's product-moment correlation
## 
## data:  ACT_Reading and College_English_Pass
## t = 4.788, df = 1953, p-value = 1.811e-06
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.06368487 0.15132340
## sample estimates:
##       cor 
## 0.1077134
with(Placement, cor.test(McCann_R, College_English_Pass))
## 
##  Pearson's product-moment correlation
## 
## data:  McCann_R and College_English_Pass
## t = 4.6837, df = 897, p-value = 3.254e-06
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.09003074 0.21769083
## sample estimates:
##       cor 
## 0.1545056
with(Placement, cor.test(McCann_W, College_English_Pass))
## 
##  Pearson's product-moment correlation
## 
## data:  McCann_W and College_English_Pass
## t = 2.1583, df = 780, p-value = 0.03121
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.006979748 0.146366990
## sample estimates:
##        cor 
## 0.07704984
with(Placement, cor.test(ACT_Math, College_English_Pass))
## 
##  Pearson's product-moment correlation
## 
## data:  ACT_Math and College_English_Pass
## t = 4.7708, df = 1962, p-value = 1.971e-06
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.06315452 0.15060386
## sample estimates:
##       cor 
## 0.1070863
with(Placement, cor.test(ALEKS, College_English_Pass))
## 
##  Pearson's product-moment correlation
## 
## data:  ALEKS and College_English_Pass
## t = 1.05, df = 990, p-value = 0.294
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.02895080  0.09539659
## sample estimates:
##        cor 
## 0.03335196
#Point biserial with Math
with(Placement, cor.test(LCCCGPA, College_Math_Pass))
## 
##  Pearson's product-moment correlation
## 
## data:  LCCCGPA and College_Math_Pass
## t = 52.269, df = 5469, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.5592294 0.5945806
## sample estimates:
##       cor 
## 0.5771754
with(Placement, cor.test(HSGPA, College_Math_Pass))
## 
##  Pearson's product-moment correlation
## 
## data:  HSGPA and College_Math_Pass
## t = 12.103, df = 4611, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1473533 0.2032952
## sample estimates:
##       cor 
## 0.1754659
with(Placement, cor.test(ACT_Math, College_Math_Pass))
## 
##  Pearson's product-moment correlation
## 
## data:  ACT_Math and College_Math_Pass
## t = 4.2217, df = 1817, p-value = 2.544e-05
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.05283695 0.14386679
## sample estimates:
##        cor 
## 0.09855804
with(Placement, cor.test(ALEKS, College_Math_Pass))
## 
##  Pearson's product-moment correlation
## 
## data:  ALEKS and College_Math_Pass
## t = 1.8316, df = 459, p-value = 0.06766
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.006193846  0.175147593
## sample estimates:
##        cor 
## 0.08518225
with(Placement, cor.test(ACT_Engl, College_Math_Pass))
## 
##  Pearson's product-moment correlation
## 
## data:  ACT_Engl and College_Math_Pass
## t = 5.1843, df = 1813, p-value = 2.41e-07
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.07527148 0.16595214
## sample estimates:
##      cor 
## 0.120864
with(Placement, cor.test(ACT_Reading, College_Math_Pass))
## 
##  Pearson's product-moment correlation
## 
## data:  ACT_Reading and College_Math_Pass
## t = 3.6429, df = 1810, p-value = 0.0002772
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.03941929 0.13084865
## sample estimates:
##        cor 
## 0.08531357
with(Placement, cor.test(McCann_R, College_Math_Pass))
## 
##  Pearson's product-moment correlation
## 
## data:  McCann_R and College_Math_Pass
## t = 2.0911, df = 380, p-value = 0.03718
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.006391295 0.204806664
## sample estimates:
##       cor 
## 0.1066607
with(Placement, cor.test(McCann_W, College_Math_Pass))
## 
##  Pearson's product-moment correlation
## 
## data:  McCann_W and College_Math_Pass
## t = 1.6083, df = 312, p-value = 0.1088
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.02021185  0.19935822
## sample estimates:
##        cor 
## 0.09067502
with(Placement, cor.test(College_English_Pass, College_Math_Pass))
## 
##  Pearson's product-moment correlation
## 
## data:  College_English_Pass and College_Math_Pass
## t = 20.669, df = 2812, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.3306463 0.3948123
## sample estimates:
##       cor 
## 0.3631598
library(bannerCommenter)
attach(corrtable)
banner("GPA")
## 
## #################################################################
## ##                             GPA                             ##
## #################################################################
  cor.test(HSGPA, LCCCGPA)
## 
##  Pearson's product-moment correlation
## 
## data:  HSGPA and LCCCGPA
## t = 31.183, df = 7878, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.3116662 0.3509763
## sample estimates:
##       cor 
## 0.3314651
  banner("ACT Reading")
## 
## #################################################################
## ##                         ACT Reading                         ##
## #################################################################
cor.test(ACT_Reading, LCCCGPA)
## 
##  Pearson's product-moment correlation
## 
## data:  ACT_Reading and LCCCGPA
## t = 12.831, df = 2997, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1939940 0.2618556
## sample estimates:
##       cor 
## 0.2282019
banner("ACT English")
## 
## #################################################################
## ##                         ACT English                         ##
## #################################################################
cor.test(ACT_Engl, LCCCGPA)
## 
##  Pearson's product-moment correlation
## 
## data:  ACT_Engl and LCCCGPA
## t = 14.92, df = 3002, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2291400 0.2957333
## sample estimates:
##       cor 
## 0.2627495
banner("ACT Math")
## 
## ##################################################################
## ##                           ACT Math                           ##
## ##################################################################
cor.test(ACT_Math, LCCCGPA)
## 
##  Pearson's product-moment correlation
## 
## data:  ACT_Math and LCCCGPA
## t = 12.546, df = 3013, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1886181 0.2564726
## sample estimates:
##       cor 
## 0.2228152
banner("Years")
## 
## #################################################################
## ##                            Years                            ##
## #################################################################
cor.test(HSGradYears, LCCCGPA)
## 
##  Pearson's product-moment correlation
## 
## data:  HSGradYears and LCCCGPA
## t = 11.973, df = 9404, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1025843 0.1423967
## sample estimates:
##       cor 
## 0.1225398
detach(corrtable)
library(apaTables)
lmoutput1<- lm(HSGPA~Col_Eng_Term, data = EnglC_Term)
apa.aov.table(lmoutput1, filename = "GPAEnglish.doc")
## 
## 
## ANOVA results using HSGPA as the dependent variable
##  
## 
##     Predictor      SS   df      MS       F    p partial_eta2 CI_90_partial_eta2
##   (Intercept) 2118.97    1 2118.97 7200.50 .000                                
##  Col_Eng_Term   16.03   10    1.60    5.45 .000          .02         [.01, .02]
##         Error  834.29 2835    0.29                                             
## 
## Note: Values in square brackets indicate the bounds of the 90% confidence interval for partial eta-squared
EnglGPApair<- TukeyHSD(aov(HSGPA~Col_Eng_Term, data = EnglC_Term))
EnglGPApair<- do.call("rbind", EnglGPApair)
EnglGPApair
##                      diff         lwr          upr        p adj
## 11/FA-10/FA  0.0847830644 -0.07834824  0.247914366 0.8488406846
## 12/FA-10/FA  0.0478719993 -0.12386035  0.219604350 0.9982879293
## 13/FA-10/FA  0.0560843953 -0.11395960  0.226128393 0.9931734087
## 14/FA-10/FA  0.0009381368 -0.16048868  0.162364952 1.0000000000
## 15/FA-10/FA -0.1015681525 -0.25302014  0.049883836 0.5336282905
## 16/FA-10/FA -0.1074634505 -0.25921707  0.044290166 0.4471919773
## 17/FA-10/FA -0.1188079691 -0.26996338  0.032347444 0.2862218516
## 18/FA-10/FA -0.1437849024 -0.30050666  0.012936853 0.1067222175
## 19/FA-10/FA -0.0234049368 -0.17588275  0.129072879 0.9999924972
## 20/FA-10/FA -0.1032723895 -0.26676027  0.060215487 0.6243247751
## 12/FA-11/FA -0.0369110651 -0.20847453  0.134652400 0.9998251415
## 13/FA-11/FA -0.0286986690 -0.19857210  0.141174764 0.9999813882
## 14/FA-11/FA -0.0838449275 -0.24509206  0.077402208 0.8484381619
## 15/FA-11/FA -0.1863512168 -0.33761168 -0.035090756 0.0035811514
## 16/FA-11/FA -0.1922465148 -0.34380898 -0.040684045 0.0022246975
## 17/FA-11/FA -0.2035910335 -0.35455454 -0.052627524 0.0007388222
## 18/FA-11/FA -0.2285679668 -0.38510464 -0.072031291 0.0001412922
## 19/FA-11/FA -0.1081880011 -0.26047558  0.044099577 0.4420690647
## 20/FA-11/FA -0.1880554539 -0.35136592 -0.024744989 0.0096740327
## 13/FA-12/FA  0.0082123961 -0.16993687  0.186361665 0.9999999999
## 14/FA-12/FA -0.0469338624 -0.21687743  0.123009709 0.9984183637
## 15/FA-12/FA -0.1494401517 -0.30993908  0.011058776 0.0948200673
## 16/FA-12/FA -0.1553354497 -0.31611903  0.005448135 0.0690993406
## 17/FA-12/FA -0.1666799684 -0.32689907 -0.006460868 0.0332980366
## 18/FA-12/FA -0.1916569016 -0.35713775 -0.026176058 0.0089375584
## 19/FA-12/FA -0.0712769360 -0.23274422  0.090190353 0.9431214661
## 20/FA-12/FA -0.1511443887 -0.32304694  0.020758162 0.1463383772
## 14/FA-13/FA -0.0551462585 -0.22338353  0.113091009 0.9935007099
## 15/FA-13/FA -0.1576525478 -0.31634365  0.001038556 0.0532933166
## 16/FA-13/FA -0.1635478458 -0.32252684 -0.004568848 0.0375117665
## 17/FA-13/FA -0.1748923644 -0.33330045 -0.016484282 0.0167280919
## 18/FA-13/FA -0.1998692977 -0.36359734 -0.036141260 0.0041346983
## 19/FA-13/FA -0.0794893321 -0.23915976  0.080181097 0.8811045133
## 20/FA-13/FA -0.1593567848 -0.32957267  0.010859100 0.0906486762
## 15/FA-14/FA -0.1025062893 -0.25192691  0.046914332 0.4978081270
## 16/FA-14/FA -0.1084015873 -0.25812793  0.041324754 0.4118983913
## 17/FA-14/FA -0.1197461059 -0.26886611  0.029373900 0.2560020389
## 18/FA-14/FA -0.1447230392 -0.29948261  0.010036535 0.0914992839
## 19/FA-14/FA -0.0243430736 -0.17480337  0.126117225 0.9999876320
## 20/FA-14/FA -0.1042105263 -0.26581839  0.057397342 0.5938697180
## 16/FA-15/FA -0.0058952980 -0.14480918  0.133018580 1.0000000000
## 17/FA-15/FA -0.0172398166 -0.15549995  0.121020317 0.9999989819
## 18/FA-15/FA -0.0422167499 -0.18654143  0.102107933 0.9974320938
## 19/FA-15/FA  0.0781632157 -0.06154144  0.217867867 0.7790586407
## 20/FA-15/FA -0.0017042370 -0.15334919  0.149940714 1.0000000000
## 17/FA-16/FA -0.0113445186 -0.14993499  0.127245956 0.9999999834
## 18/FA-16/FA -0.0363214519 -0.18096263  0.108319723 0.9993047868
## 19/FA-16/FA  0.0840585137 -0.05597307  0.224090099 0.6949504571
## 20/FA-16/FA  0.0041910610 -0.14775514  0.156137257 1.0000000000
## 18/FA-17/FA -0.0249769333 -0.16899036  0.119036498 0.9999761730
## 19/FA-17/FA  0.0954030323 -0.04398005  0.234786115 0.5014188388
## 20/FA-17/FA  0.0155355796 -0.13581317  0.166884334 0.9999998469
## 19/FA-18/FA  0.1203799656 -0.02502084  0.265780769 0.2155273130
## 20/FA-18/FA  0.0405125129 -0.11639572  0.197420751 0.9991139071
## 20/FA-19/FA -0.0798674527 -0.23253693  0.072802029 0.8433955947
write.csv(EnglGPApair, "enggpapair.csv")

lmoutput2<- lm(ACT_Engl~Col_Eng_Term, data = EnglC_Term)
apa.aov.table(lmoutput2, filename = "ACTEng.doc")
## 
## 
## ANOVA results using ACT_Engl as the dependent variable
##  
## 
##     Predictor       SS   df      MS     F    p partial_eta2 CI_90_partial_eta2
##   (Intercept)  1121.33    1 1121.33 60.11 .000                                
##  Col_Eng_Term  1258.16   10  125.82  6.74 .000          .05         [.03, .06]
##         Error 24494.99 1313   18.66                                           
## 
## Note: Values in square brackets indicate the bounds of the 90% confidence interval for partial eta-squared
EnglACTEnpair<- TukeyHSD(aov(ACT_Engl~Col_Eng_Term, data = EnglC_Term))
EnglACTEnpair<- do.call("rbind", EnglACTEnpair)
EnglACTEnpair
##                    diff        lwr        upr        p adj
## 11/FA-10/FA -3.83333333 -16.546738  8.8800713 9.966549e-01
## 12/FA-10/FA  1.00000000 -10.371215 12.3712148 1.000000e+00
## 13/FA-10/FA  4.40000000  -4.408105 13.2081051 8.779176e-01
## 14/FA-10/FA  1.78431373  -6.344549  9.9131768 9.997871e-01
## 15/FA-10/FA  0.42496051  -7.672662  8.5225829 1.000000e+00
## 16/FA-10/FA -0.35976505  -8.453386  7.7338558 1.000000e+00
## 17/FA-10/FA -0.63464338  -8.727803  7.4585164 1.000000e+00
## 18/FA-10/FA -0.58766859  -8.697749  7.5224116 1.000000e+00
## 19/FA-10/FA -0.80977312  -8.913337  7.2937905 9.999999e-01
## 20/FA-10/FA -1.24378109  -9.373953  6.8863912 9.999926e-01
## 12/FA-11/FA  4.83333333  -7.880071 17.5467379 9.795879e-01
## 13/FA-11/FA  8.23333333  -2.250409 18.7170753 2.866277e-01
## 14/FA-11/FA  5.61764706  -4.302260 15.5375537 7.646033e-01
## 15/FA-11/FA  4.25829384  -5.636029 14.1526165 9.514415e-01
## 16/FA-11/FA  3.47356828  -6.417480 13.3646162 9.887321e-01
## 17/FA-11/FA  3.19868996  -6.691981 13.0893607 9.940914e-01
## 18/FA-11/FA  3.24566474  -6.658856 13.1501855 9.934370e-01
## 19/FA-11/FA  3.02356021  -6.875625 12.9227458 9.962807e-01
## 20/FA-11/FA  2.58955224  -7.331427 12.5105317 9.990125e-01
## 13/FA-12/FA  3.40000000  -5.408105 12.2081051 9.771993e-01
## 14/FA-12/FA  0.78431373  -7.344549  8.9131768 9.999999e-01
## 15/FA-12/FA -0.57503949  -8.672662  7.5225829 1.000000e+00
## 16/FA-12/FA -1.35976505  -9.453386  6.7338558 9.999821e-01
## 17/FA-12/FA -1.63464338  -9.727803  6.4585164 9.999003e-01
## 18/FA-12/FA -1.58766859  -9.697749  6.5224116 9.999252e-01
## 19/FA-12/FA -1.80977312  -9.913337  6.2937905 9.997512e-01
## 20/FA-12/FA -2.24378109 -10.373953  5.8863912 9.984063e-01
## 14/FA-13/FA -2.61568627  -6.404697  1.1733249 4.866014e-01
## 15/FA-13/FA -3.97503949  -7.696555 -0.2535238 2.488220e-02
## 16/FA-13/FA -4.75976505  -8.472566 -1.0469645 1.881807e-03
## 17/FA-13/FA -5.03464338  -8.746439 -1.3228479 6.745436e-04
## 18/FA-13/FA -4.98766859  -8.736214 -1.2391235 9.699720e-04
## 19/FA-13/FA -5.20977312  -8.944199 -1.4753477 3.862016e-04
## 20/FA-13/FA -5.64378109  -9.435600 -1.8519621 9.407649e-05
## 15/FA-14/FA -1.35935322  -2.890816  0.1721099 1.365371e-01
## 16/FA-14/FA -2.14407878  -3.654240 -0.6339172 2.681862e-04
## 17/FA-14/FA -2.41895710  -3.926646 -0.9112682 1.433461e-05
## 18/FA-14/FA -2.37198232  -3.968006 -0.7759590 9.740488e-05
## 19/FA-14/FA -2.59408685  -4.156660 -1.0315142 5.532468e-06
## 20/FA-14/FA -3.02809482  -4.723262 -1.3329277 5.725467e-07
## 16/FA-15/FA -0.78472556  -2.116514  0.5470633 7.174983e-01
## 17/FA-15/FA -1.05960388  -2.388588  0.2693804 2.651896e-01
## 18/FA-15/FA -1.01262910  -2.441042  0.4157840 4.442642e-01
## 19/FA-15/FA -1.23473363  -2.625671  0.1562038 1.364471e-01
## 20/FA-15/FA -1.66874160  -3.207139 -0.1303446 2.078978e-02
## 17/FA-16/FA -0.27487833  -1.579259  1.0295020 9.998530e-01
## 18/FA-16/FA -0.22790354  -1.633454  1.1776471 9.999872e-01
## 19/FA-16/FA -0.45000807  -1.817457  0.9174406 9.932126e-01
## 20/FA-16/FA -0.88401604  -2.401209  0.6331767 7.313248e-01
## 18/FA-17/FA  0.04697478  -1.355919  1.4498684 1.000000e+00
## 19/FA-17/FA -0.17512975  -1.539847  1.1895876 9.999986e-01
## 20/FA-17/FA -0.60913772  -2.123869  0.9055938 9.694703e-01
## 19/FA-18/FA -0.22210453  -1.683822  1.2396130 9.999931e-01
## 20/FA-18/FA -0.65611250  -2.258790  0.9465653 9.654218e-01
## 20/FA-19/FA -0.43400797  -2.003377  1.1353611 9.983782e-01
write.csv(EnglACTEnpair, "engactengpair.csv")

lmoutput3<- lm(ACT_Reading~Col_Eng_Term, data = EnglC_Term)
apa.aov.table(lmoutput3, filename = "ACTRdg.doc")
## 
## 
## ANOVA results using ACT_Reading as the dependent variable
##  
## 
##     Predictor       SS   df      MS     F    p partial_eta2 CI_90_partial_eta2
##   (Intercept)  1160.33    1 1160.33 55.86 .000                                
##  Col_Eng_Term   727.84   10   72.78  3.50 .000          .03         [.01, .03]
##         Error 27251.57 1312   20.77                                           
## 
## Note: Values in square brackets indicate the bounds of the 90% confidence interval for partial eta-squared
EnglACTRdpair<- TukeyHSD(aov(ACT_Reading~Col_Eng_Term, data = EnglC_Term))
EnglACTRdpair<- do.call("rbind", EnglACTRdpair)
EnglACTRdpair
##                    diff         lwr          upr       p adj
## 11/FA-10/FA -1.66666667 -15.0814934 11.748160020 0.999999000
## 12/FA-10/FA  2.00000000  -9.9985858 13.998585751 0.999983339
## 13/FA-10/FA  5.20000000  -4.0940646 14.494064558 0.777877989
## 14/FA-10/FA  1.88077859  -6.6958933 10.457450481 0.999788998
## 15/FA-10/FA  1.54660348  -6.9977798 10.090986743 0.999963872
## 16/FA-10/FA  0.74122807  -7.7986885  9.281144647 0.999999970
## 17/FA-10/FA  0.28966521  -8.2500092  8.829339628 1.000000000
## 18/FA-10/FA  1.05098039  -7.5078349  9.609795659 0.999999107
## 19/FA-10/FA  0.78359511  -7.7670571  9.334247341 0.999999949
## 20/FA-10/FA -0.02487562  -8.6036046  8.553853327 1.000000000
## 12/FA-11/FA  3.66666667  -9.7481600 17.081493353 0.998532214
## 13/FA-11/FA  6.86666667  -4.1954828 17.928816142 0.648018399
## 14/FA-11/FA  3.54744526  -6.9192073 14.014097813 0.991440477
## 15/FA-11/FA  3.21327014  -7.2269406 13.653480888 0.996040596
## 16/FA-11/FA  2.40789474  -8.0286607 12.844450210 0.999666839
## 17/FA-11/FA  1.95633188  -8.4800254 12.392689199 0.999949950
## 18/FA-11/FA  2.71764706  -7.7343783 13.169672402 0.999044978
## 19/FA-11/FA  2.45026178  -7.9950802 12.895603734 0.999613638
## 20/FA-11/FA  1.64179104  -8.8265472 12.110129279 0.999990643
## 13/FA-12/FA  3.20000000  -6.0940646 12.494064558 0.990325131
## 14/FA-12/FA -0.11922141  -8.6958933  8.457450481 1.000000000
## 15/FA-12/FA -0.45339652  -8.9977798  8.090986743 1.000000000
## 16/FA-12/FA -1.25877193  -9.7986885  7.281144647 0.999994820
## 17/FA-12/FA -1.71033479 -10.2500092  6.829339628 0.999907710
## 18/FA-12/FA -0.94901961  -9.5078349  7.609795659 0.999999669
## 19/FA-12/FA -1.21640489  -9.7670571  7.334247341 0.999996312
## 20/FA-12/FA -2.02487562 -10.6036046  6.553853327 0.999591777
## 14/FA-13/FA -3.31922141  -7.3158296  0.677386742 0.211020008
## 15/FA-13/FA -3.65339652  -7.5802351  0.273442077 0.095286791
## 16/FA-13/FA -4.45877193  -8.3758820 -0.541661881 0.011361369
## 17/FA-13/FA -4.91033479  -8.8269169 -0.993752717 0.002732788
## 18/FA-13/FA -4.14901961  -8.1071625 -0.190876765 0.030711258
## 19/FA-13/FA -4.41640489  -8.3568655 -0.475944316 0.013897727
## 20/FA-13/FA -5.22487562  -9.2258963 -1.223854955 0.001362815
## 15/FA-14/FA -0.33417511  -1.9465417  1.278191512 0.999873677
## 16/FA-14/FA -1.13955052  -2.7280768  0.448975799 0.425400253
## 17/FA-14/FA -1.59111338  -3.1783373 -0.003889431 0.048815307
## 18/FA-14/FA -0.82979820  -2.5169732  0.857376808 0.888362154
## 19/FA-14/FA -1.09718348  -2.7424477  0.548080710 0.541092793
## 20/FA-14/FA -1.90565421  -3.6911040 -0.120204378 0.025096133
## 16/FA-15/FA -0.80537541  -2.2091562  0.598405395 0.749741696
## 17/FA-15/FA -1.25693826  -2.6592451  0.145368596 0.127171285
## 18/FA-15/FA -0.49562308  -2.0101343  1.018888114 0.993507478
## 19/FA-15/FA -0.76300836  -2.2306864  0.704669706 0.847641562
## 20/FA-15/FA -1.57147910  -3.1947523  0.051794070 0.067786114
## 17/FA-16/FA -0.45156286  -1.8263917  0.923265952 0.993315836
## 18/FA-16/FA  0.30975232  -1.1793527  1.798857388 0.999869410
## 19/FA-16/FA  0.04236704  -1.3990797  1.483813761 1.000000000
## 20/FA-16/FA -0.76610369  -2.3656991  0.833491727 0.904535940
## 18/FA-17/FA  0.76131518  -0.7264005  2.249030843 0.860232644
## 19/FA-17/FA  0.49392990  -0.9460814  1.933941234 0.990605234
## 20/FA-17/FA -0.31454083  -1.9128429  1.283761235 0.999921482
## 19/FA-18/FA -0.26738528  -1.8168730  1.282102467 0.999976909
## 20/FA-18/FA -1.07585601  -2.7734570  0.621744981 0.618217617
## 20/FA-19/FA -0.80847074  -2.4644248  0.847483335 0.893048965
write.csv(EnglACTRdpair, "engactrdpair.csv")

lmoutput4<- lm(McCann_R~Col_Eng_Term, data = EnglC_Term)
apa.aov.table(lmoutput4, filename = "McR.doc")
## 
## 
## ANOVA results using McCann_R as the dependent variable
##  
## 
##     Predictor       SS  df       MS      F    p partial_eta2 CI_90_partial_eta2
##   (Intercept) 39445.33   1 39445.33 220.52 .000                                
##  Col_Eng_Term  4074.97   8   509.37   2.85 .004          .04         [.01, .06]
##         Error 99275.73 555   178.88                                            
## 
## Note: Values in square brackets indicate the bounds of the 90% confidence interval for partial eta-squared
EnglMRpair<- TukeyHSD(aov(McCann_R~Col_Eng_Term, data = EnglC_Term))
EnglMRpair<- do.call("rbind", EnglMRpair)
EnglMRpair
##                    diff        lwr       upr       p adj
## 12/FA-11/FA  -2.6666667 -50.758717 45.425384 0.999999976
## 13/FA-11/FA  35.3333333 -12.758717 83.425384 0.351204925
## 15/FA-11/FA  -5.1666667 -43.186771 32.853438 0.999972062
## 16/FA-11/FA -13.2121212 -37.554413 11.130170 0.752488250
## 17/FA-11/FA -15.1996008 -39.460647  9.061445 0.578430068
## 18/FA-11/FA -13.6352201 -37.907035 10.636594 0.715400694
## 19/FA-11/FA -16.3534137 -40.830148  8.123321 0.487740606
## 20/FA-11/FA -14.2962963 -39.643033 11.050440 0.710870346
## 13/FA-12/FA  38.0000000 -20.900492 96.900492 0.537642797
## 15/FA-12/FA  -2.5000000 -53.509323 48.509323 0.999999991
## 16/FA-12/FA -10.5454545 -52.366141 31.275232 0.997237933
## 17/FA-12/FA -12.5329341 -54.306383 29.240515 0.990927466
## 18/FA-12/FA -10.9685535 -52.748257 30.811150 0.996339495
## 19/FA-12/FA -13.6867470 -55.585831 28.212337 0.984190211
## 20/FA-12/FA -11.6296296 -54.042832 30.783572 0.995058816
## 15/FA-13/FA -40.5000000 -91.509323 10.509323 0.247739667
## 16/FA-13/FA -48.5454545 -90.366141 -6.724768 0.009865287
## 17/FA-13/FA -50.5329341 -92.306383 -8.759485 0.005682167
## 18/FA-13/FA -48.9685535 -90.748257 -7.188850 0.008707687
## 19/FA-13/FA -51.6867470 -93.585831 -9.787663 0.004298110
## 20/FA-13/FA -49.6296296 -92.042832 -7.216428 0.008895764
## 16/FA-15/FA  -8.0454545 -37.738094 21.647185 0.995446199
## 17/FA-15/FA -10.0329341 -39.659004 19.593136 0.980119052
## 18/FA-15/FA  -8.4685535 -38.103443 21.166336 0.993453859
## 19/FA-15/FA -11.1867470 -40.989703 18.616209 0.962643493
## 20/FA-15/FA  -9.1296296 -39.651142 21.391883 0.991106905
## 17/FA-16/FA  -1.9874796  -6.959687  2.984728 0.946104114
## 18/FA-16/FA  -0.4230989  -5.447586  4.601388 0.999999335
## 19/FA-16/FA  -3.1412924  -9.077202  2.794617 0.777649581
## 20/FA-16/FA  -1.0841751  -9.948797  7.780447 0.999987635
## 18/FA-17/FA   1.5643807  -3.050452  6.179213 0.979993932
## 19/FA-17/FA  -1.1538129  -6.747223  4.439597 0.999348150
## 20/FA-17/FA   0.9033045  -7.735719  9.542328 0.999996356
## 19/FA-18/FA  -2.7181935  -8.358127  2.921740 0.855064681
## 20/FA-18/FA  -0.6610762  -9.330295  8.008142 0.999999696
## 20/FA-19/FA   2.0571174  -7.170283 11.284517 0.998852392
write.csv(EnglMRpair, "engmrpair.csv")

lmoutput5<- lm(McCann_W~Col_Eng_Term, data = EnglC_Term)
apa.aov.table(lmoutput5, filename = "McW.doc")
## 
## 
## ANOVA results using McCann_W as the dependent variable
##  
## 
##     Predictor     SS  df    MS     F    p partial_eta2 CI_90_partial_eta2
##   (Intercept)  36.00   1 36.00 54.84 .000                                
##  Col_Eng_Term  11.01   6  1.83  2.79 .011          .03         [.00, .05]
##         Error 319.05 486  0.66                                           
## 
## Note: Values in square brackets indicate the bounds of the 90% confidence interval for partial eta-squared
EnglMWpair<- TukeyHSD(aov(McCann_W~Col_Eng_Term, data = EnglC_Term))
EnglMWpair<- do.call("rbind", EnglMWpair)
EnglMWpair
##                    diff        lwr        upr      p adj
## 15/FA-11/FA -2.00000000 -5.3925621 1.39256211 0.58571961
## 16/FA-11/FA -1.12396694 -3.5327630 1.28482916 0.81161168
## 17/FA-11/FA -1.24223602 -3.6485782 1.16410613 0.72757360
## 18/FA-11/FA -1.13207547 -3.5385110 1.27436010 0.80562670
## 19/FA-11/FA -1.55882353 -3.9927495 0.87510249 0.48378482
## 20/FA-11/FA -1.62500000 -4.0977333 0.84773331 0.45105608
## 16/FA-15/FA  0.87603306 -1.5327630 3.28482916 0.93471429
## 17/FA-15/FA  0.75776398 -1.6485782 3.16410613 0.96721028
## 18/FA-15/FA  0.86792453 -1.5385110 3.27436010 0.93717768
## 19/FA-15/FA  0.44117647 -1.9927495 2.87510249 0.99828564
## 20/FA-15/FA  0.37500000 -2.0977333 2.84773331 0.99937857
## 17/FA-16/FA -0.11826908 -0.4068926 0.17035445 0.88895041
## 18/FA-16/FA -0.00810853 -0.2975099 0.28129284 0.99999997
## 19/FA-16/FA -0.43485659 -0.9004925 0.03077938 0.08506519
## 20/FA-16/FA -0.50103306 -1.1391796 0.13711348 0.23432464
## 18/FA-17/FA  0.11016055 -0.1580503 0.37837138 0.88784001
## 19/FA-17/FA -0.31658750 -0.7693576 0.13618257 0.37217198
## 20/FA-17/FA -0.38276398 -1.0115842 0.24605627 0.54718459
## 19/FA-18/FA -0.42674806 -0.8800144 0.02651826 0.08022196
## 20/FA-18/FA -0.49292453 -1.1221022 0.13625311 0.23668490
## 20/FA-19/FA -0.06617647 -0.7934510 0.66109803 0.99996849
write.csv(EnglMWpair, "engmwpair.csv")
lmoutput6<- lm(HSGPA~Col_Math_Term, data = MathC_Term)
apa.aov.table(lmoutput6, filename = "GPAMath.doc")
## 
## 
## ANOVA results using HSGPA as the dependent variable
##  
## 
##      Predictor      SS   df      MS       F    p partial_eta2
##    (Intercept) 1283.92    1 1283.92 4565.49 .000             
##  Col_Math_Term   16.76   10    1.68    5.96 .000          .02
##          Error  669.87 2382    0.28                          
##  CI_90_partial_eta2
##                    
##          [.01, .03]
##                    
## 
## Note: Values in square brackets indicate the bounds of the 90% confidence interval for partial eta-squared
MathGPApair<- TukeyHSD(aov(HSGPA~Col_Math_Term, data = MathC_Term))
MathGPApair<- do.call("rbind", MathGPApair)
MathGPApair
##                     diff         lwr          upr        p adj
## 11/FA-10/FA  0.046060440 -0.15743347  0.249554346 9.997227e-01
## 12/FA-10/FA -0.029431624 -0.23937813  0.180514882 9.999968e-01
## 13/FA-10/FA -0.038350364 -0.23064562  0.153944891 9.999124e-01
## 14/FA-10/FA  0.065236154 -0.12724782  0.257720125 9.915260e-01
## 15/FA-10/FA -0.140571996 -0.32179793  0.040653940 3.053883e-01
## 16/FA-10/FA  0.048741758 -0.13332212  0.230805640 9.987852e-01
## 17/FA-10/FA  0.072238716 -0.11354874  0.258026171 9.761753e-01
## 18/FA-10/FA  0.089670355 -0.09949572  0.278836431 9.108408e-01
## 19/FA-10/FA  0.078474359 -0.10841964  0.265368360 9.591774e-01
## 20/FA-10/FA -0.117839031 -0.29522041  0.059542345 5.481435e-01
## 12/FA-11/FA -0.075492063 -0.27693217  0.125948047 9.817902e-01
## 13/FA-11/FA -0.084410803 -0.26738088  0.098559270 9.245485e-01
## 14/FA-11/FA  0.019175714 -0.16399268  0.202344113 9.999998e-01
## 15/FA-11/FA -0.186632435 -0.35793165 -0.015333216 1.967919e-02
## 16/FA-11/FA  0.002681319 -0.16950416  0.174866800 1.000000e+00
## 17/FA-11/FA  0.026178276 -0.14993976  0.202296309 9.999945e-01
## 18/FA-11/FA  0.043609915 -0.13606865  0.223288481 9.994835e-01
## 19/FA-11/FA  0.032413919 -0.14487102  0.209698861 9.999608e-01
## 20/FA-11/FA -0.163899471 -0.33112607  0.003327128 6.057831e-02
## 13/FA-12/FA -0.008918740 -0.19903926  0.181201784 1.000000e+00
## 14/FA-12/FA  0.094667778 -0.09564362  0.284979175 8.815129e-01
## 15/FA-12/FA -0.111140372 -0.29005708  0.067776335 6.481133e-01
## 16/FA-12/FA  0.078173382 -0.10159204  0.257938800 9.483727e-01
## 17/FA-12/FA  0.101670340 -0.08186529  0.285205968 7.893853e-01
## 18/FA-12/FA  0.119101979 -0.06785297  0.306056927 6.116887e-01
## 19/FA-12/FA  0.107905983 -0.07674969  0.292561652 7.288242e-01
## 20/FA-12/FA -0.088407407 -0.26342884  0.086614023 8.707260e-01
## 14/FA-13/FA  0.103586517 -0.06705450  0.274227536 6.798603e-01
## 15/FA-13/FA -0.102221632 -0.26005419  0.055610930 5.870768e-01
## 16/FA-13/FA  0.087092122 -0.07170188  0.245886124 7.995835e-01
## 17/FA-13/FA  0.110589079 -0.05246078  0.273638938 5.156412e-01
## 18/FA-13/FA  0.128020718 -0.03886871  0.294910149 3.219446e-01
## 19/FA-13/FA  0.116824723 -0.04748488  0.281134326 4.405629e-01
## 20/FA-13/FA -0.079488668 -0.23289151  0.073914170 8.511247e-01
## 15/FA-14/FA -0.205808149 -0.36387058 -0.047745719 1.417294e-03
## 16/FA-14/FA -0.016494396 -0.17551688  0.142528085 9.999998e-01
## 17/FA-14/FA  0.007002562 -0.15626982  0.170274944 1.000000e+00
## 18/FA-14/FA  0.024434201 -0.14267264  0.191541043 9.999953e-01
## 19/FA-14/FA  0.013238205 -0.15129222  0.177768628 1.000000e+00
## 20/FA-14/FA -0.183075185 -0.33671452 -0.029435851 5.965138e-03
## 16/FA-15/FA  0.189313754  0.04412109  0.334506418 1.382634e-03
## 17/FA-15/FA  0.212810711  0.06297536  0.362646058 2.603420e-04
## 18/FA-15/FA  0.230242350  0.07623762  0.384247080 8.238783e-05
## 19/FA-15/FA  0.219046355  0.06784113  0.370251580 1.694074e-04
## 20/FA-15/FA  0.022732964 -0.11654304  0.162008968 9.999865e-01
## 17/FA-16/FA  0.023496958 -0.12735081  0.174344724 9.999913e-01
## 18/FA-16/FA  0.040928597 -0.11406132  0.195918513 9.989205e-01
## 19/FA-16/FA  0.029732601 -0.12247593  0.181941135 9.999276e-01
## 20/FA-16/FA -0.166580790 -0.30694540 -0.026216183 6.329697e-03
## 18/FA-17/FA  0.017431639 -0.14191577  0.176779045 9.999997e-01
## 19/FA-17/FA  0.006235643 -0.15040777  0.162879057 1.000000e+00
## 20/FA-17/FA -0.190077747 -0.33523953 -0.044915961 1.281465e-03
## 19/FA-18/FA -0.011195996 -0.17183218  0.149440192 1.000000e+00
## 20/FA-18/FA -0.207509386 -0.35697099 -0.058047786 4.177413e-04
## 20/FA-19/FA -0.196313390 -0.34288874 -0.049738040 8.450533e-04
write.csv(MathGPApair, "mathgpapair.csv")

lmoutput7<- lm(ACT_Math~Col_Math_Term, data = MathC_Term)
apa.aov.table(lmoutput7, filename = "ACTMath.doc")
## 
## 
## ANOVA results using ACT_Math as the dependent variable
##  
## 
##      Predictor       SS  df      MS      F    p partial_eta2 CI_90_partial_eta2
##    (Intercept)  1404.50   1 1404.50 107.37 .000                                
##  Col_Math_Term  1053.72   9  117.08   8.95 .000          .07         [.04, .09]
##          Error 13054.24 998   13.08                                            
## 
## Note: Values in square brackets indicate the bounds of the 90% confidence interval for partial eta-squared
MathACTpair<- TukeyHSD(aov(ACT_Math~Col_Math_Term, data = MathC_Term))
MathACTpair<- do.call("rbind", MathACTpair)
MathACTpair
##                    diff         lwr         upr        p adj
## 12/FA-10/FA -0.50000000 -14.5455243 13.54552434 1.000000e+00
## 13/FA-10/FA -5.00000000 -16.4681226  6.46812260 9.325463e-01
## 14/FA-10/FA -3.16197183 -11.3845798  5.06063614 9.692997e-01
## 15/FA-10/FA -5.86111111 -14.0450390  2.32281678 4.090582e-01
## 16/FA-10/FA -6.40643275 -14.5629043  1.75003880 2.746987e-01
## 17/FA-10/FA -5.60734463 -13.7622178  2.54752855 4.710902e-01
## 18/FA-10/FA -5.96853147 -14.1342294  2.19716649 3.782797e-01
## 19/FA-10/FA -5.91666667 -14.0819735  2.24864021 3.913355e-01
## 20/FA-10/FA -7.29894180 -15.4509219  0.85303830 1.249297e-01
## 13/FA-12/FA -4.50000000 -18.5455243  9.54552434 9.913258e-01
## 14/FA-12/FA -2.66197183 -14.2105735  8.88662981 9.993123e-01
## 15/FA-12/FA -5.36111111 -16.8822045  6.15998232 9.017015e-01
## 16/FA-12/FA -5.90643275 -17.4080390  5.59517349 8.341595e-01
## 17/FA-12/FA -5.10734463 -16.6078174  6.39312817 9.247869e-01
## 18/FA-12/FA -5.46853147 -16.9766825  6.03961961 8.895960e-01
## 19/FA-12/FA -5.41666667 -16.9245402  6.09120691 8.952264e-01
## 20/FA-12/FA -6.79894180 -18.2973633  4.69947973 6.861701e-01
## 14/FA-13/FA  1.83802817  -6.3845798 10.06063614 9.994635e-01
## 15/FA-13/FA -0.86111111  -9.0450390  7.32281678 9.999991e-01
## 16/FA-13/FA -1.40643275  -9.5629043  6.75003880 9.999379e-01
## 17/FA-13/FA -0.60734463  -8.7622178  7.54752855 1.000000e+00
## 18/FA-13/FA -0.96853147  -9.1342294  7.19716649 9.999975e-01
## 19/FA-13/FA -0.91666667  -9.0819735  7.24864021 9.999985e-01
## 20/FA-13/FA -2.29894180 -10.4509219  5.85303830 9.966451e-01
## 15/FA-14/FA -2.69913928  -4.4513155 -0.94696303 5.269576e-05
## 16/FA-14/FA -3.24446092  -4.8635576 -1.62536424 1.429423e-08
## 17/FA-14/FA -2.44537280  -4.0563981 -0.83434750 7.465919e-05
## 18/FA-14/FA -2.80655964  -4.4715128 -1.14160647 4.972378e-06
## 19/FA-14/FA -2.75469484  -4.4177289 -1.09166080 8.127933e-06
## 20/FA-14/FA -4.13696997  -5.7332862 -2.54065375 3.108624e-15
## 16/FA-15/FA -0.54532164  -1.9548847  0.86424138 9.680626e-01
## 17/FA-15/FA  0.25376648  -1.1465179  1.65405086 9.999055e-01
## 18/FA-15/FA -0.10742036  -1.5694268  1.35458610 1.000000e+00
## 19/FA-15/FA -0.05555556  -1.5153761  1.40426500 1.000000e+00
## 20/FA-15/FA -1.43783069  -2.8211670 -0.05449439 3.406649e-02
## 17/FA-16/FA  0.79908812  -0.4306065  2.02878270 5.560685e-01
## 18/FA-16/FA  0.43790128  -0.8616430  1.73744555 9.875464e-01
## 19/FA-16/FA  0.48976608  -0.8073185  1.78685068 9.727849e-01
## 20/FA-16/FA -0.89250905  -2.1028692  0.31785111 3.651217e-01
## 18/FA-17/FA -0.36118684  -1.6506611  0.92828739 9.968144e-01
## 19/FA-17/FA -0.30932203  -1.5963173  0.97767328 9.990380e-01
## 20/FA-17/FA -1.69159717  -2.8911388 -0.49205551 3.676231e-04
## 19/FA-18/FA  0.05186480  -1.3020272  1.40575677 1.000000e+00
## 20/FA-18/FA -1.33041033  -2.6014598 -0.05936088 3.165438e-02
## 20/FA-19/FA -1.38227513  -2.6508097 -0.11374060 2.027401e-02
write.csv(MathGPApair, "mathactpair.csv")

lmoutput8<- lm(ALEKS~Col_Math_Term, data = MathC_Term)
apa.aov.table(lmoutput8, filename = "ALEKS.doc")
## 
## 
## ANOVA results using ALEKS as the dependent variable
##  
## 
##      Predictor       SS  df      MS     F    p partial_eta2 CI_90_partial_eta2
##    (Intercept)   784.00   1  784.00  2.95 .087                                
##  Col_Math_Term 33463.70   8 4182.96 15.73 .000          .35         [.25, .40]
##          Error 61947.62 233  265.87                                           
## 
## Note: Values in square brackets indicate the bounds of the 90% confidence interval for partial eta-squared
MathALEKSpair<- TukeyHSD(aov(ALEKS~Col_Math_Term, data = MathC_Term))
MathALEKSpair<- do.call("rbind", MathALEKSpair)
MathALEKSpair
##                    diff       lwr         upr        p adj
## 12/FA-11/FA   8.0000000 -64.20394  80.2039402 9.999939e-01
## 13/FA-11/FA  11.0000000 -61.20394  83.2039402 9.999281e-01
## 15/FA-11/FA  10.3333333 -48.62094  69.2876036 9.997924e-01
## 16/FA-11/FA  20.9791667 -30.60582  72.5641532 9.380808e-01
## 17/FA-11/FA  18.5454545 -33.08736  70.1782714 9.699906e-01
## 18/FA-11/FA  13.7037037 -38.28908  65.6964830 9.960145e-01
## 19/FA-11/FA   2.1951220 -49.47966  53.8698996 1.000000e+00
## 20/FA-11/FA  -7.5000000 -58.89069  43.8906921 9.999482e-01
## 13/FA-12/FA   3.0000000 -69.20394  75.2039402 1.000000e+00
## 15/FA-12/FA   2.3333333 -56.62094  61.2876036 1.000000e+00
## 16/FA-12/FA  12.9791667 -38.60582  64.5641532 9.971148e-01
## 17/FA-12/FA  10.5454545 -41.08736  62.1782714 9.993543e-01
## 18/FA-12/FA   5.7037037 -46.28908  57.6964830 9.999943e-01
## 19/FA-12/FA  -5.8048780 -57.47966  45.8698996 9.999932e-01
## 20/FA-12/FA -15.5000000 -66.89069  35.8906921 9.900874e-01
## 15/FA-13/FA  -0.6666667 -59.62094  58.2876036 1.000000e+00
## 16/FA-13/FA   9.9791667 -41.60582  61.5641532 9.995670e-01
## 17/FA-13/FA   7.5454545 -44.08736  59.1782714 9.999477e-01
## 18/FA-13/FA   2.7037037 -49.28908  54.6964830 1.000000e+00
## 19/FA-13/FA  -8.8048780 -60.47966  42.8698996 9.998322e-01
## 20/FA-13/FA -18.5000000 -69.89069  32.8906921 9.695793e-01
## 16/FA-15/FA  10.6458333 -19.73850  41.0301688 9.742112e-01
## 17/FA-15/FA   8.2121212 -22.25335  38.6775899 9.953480e-01
## 18/FA-15/FA   3.3703704 -27.70126  34.4419990 9.999948e-01
## 19/FA-15/FA  -8.1382114 -38.67474  22.3983185 9.956977e-01
## 20/FA-15/FA -17.8333333 -47.88662  12.2199567 6.432236e-01
## 17/FA-16/FA  -2.4337121 -13.08968   8.2222546 9.985475e-01
## 18/FA-16/FA  -7.2754630 -19.55760   5.0066767 6.454157e-01
## 19/FA-16/FA -18.7840447 -29.64151  -7.9265818 5.329371e-06
## 20/FA-16/FA -28.4791667 -37.89219 -19.0661392 3.037570e-13
## 18/FA-17/FA  -4.8417508 -17.32325   7.6397513 9.526629e-01
## 19/FA-17/FA -16.3503326 -27.43282  -5.2678490 2.170312e-04
## 20/FA-17/FA -26.0454545 -35.71717 -16.3737418 4.404255e-13
## 19/FA-18/FA -11.5085818 -24.16254   1.1453808 1.074050e-01
## 20/FA-18/FA -21.2037037 -32.64238  -9.7650257 7.488033e-07
## 20/FA-19/FA  -9.6951220 -19.58840   0.1981536 5.973064e-02
write.csv(MathALEKSpair, "mathactpair.csv")
gpatermenglish<- lm(HSGPA ~ Col_Eng_Term, data = EnglC_Term)
actreading<- lm(ACT_Reading ~ Col_Eng_Term, data = EnglC_Term)
actenglish<- lm(ACT_Engl ~ Col_Eng_Term, data = EnglC_Term)
mccannw<- lm(McCann_W ~ Col_Eng_Term, data = EnglC_Term)
mccannr<- lm(McCann_R ~ Col_Eng_Term, data = EnglC_Term)



summary(gpatermenglish)
## 
## Call:
## lm(formula = HSGPA ~ Col_Eng_Term, data = EnglC_Term)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.93443 -0.37827  0.04251  0.39518  1.52967 
## 
## Coefficients:
##                     Estimate Std. Error t value Pr(>|t|)    
## (Intercept)        3.0418952  0.0358478  84.856  < 2e-16 ***
## Col_Eng_Term11/FA  0.0847831  0.0506414   1.674  0.09420 .  
## Col_Eng_Term12/FA  0.0478720  0.0533114   0.898  0.36928    
## Col_Eng_Term13/FA  0.0560844  0.0527873   1.062  0.28812    
## Col_Eng_Term14/FA  0.0009381  0.0501122   0.019  0.98507    
## Col_Eng_Term15/FA -0.1015682  0.0470157  -2.160  0.03083 *  
## Col_Eng_Term16/FA -0.1074635  0.0471094  -2.281  0.02261 *  
## Col_Eng_Term17/FA -0.1188080  0.0469237  -2.532  0.01140 *  
## Col_Eng_Term18/FA -0.1437849  0.0486516  -2.955  0.00315 ** 
## Col_Eng_Term19/FA -0.0234049  0.0473342  -0.494  0.62102    
## Col_Eng_Term20/FA -0.1032724  0.0507521  -2.035  0.04196 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.5425 on 2835 degrees of freedom
##   (291 observations deleted due to missingness)
## Multiple R-squared:  0.01885,    Adjusted R-squared:  0.01539 
## F-statistic: 5.447 on 10 and 2835 DF,  p-value: 4.784e-08
summary(actreading)
## 
## Call:
## lm(formula = ACT_Reading ~ Col_Eng_Term, data = EnglC_Term)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -11.7176  -3.0848  -0.4079   2.5497  16.0437 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)       19.66667    2.63129   7.474 1.41e-13 ***
## Col_Eng_Term11/FA -1.66667    4.16043  -0.401   0.6888    
## Col_Eng_Term12/FA  2.00000    3.72120   0.537   0.5910    
## Col_Eng_Term13/FA  5.20000    2.88243   1.804   0.0715 .  
## Col_Eng_Term14/FA  1.88078    2.65994   0.707   0.4796    
## Col_Eng_Term15/FA  1.54660    2.64993   0.584   0.5596    
## Col_Eng_Term16/FA  0.74123    2.64854   0.280   0.7796    
## Col_Eng_Term17/FA  0.28967    2.64847   0.109   0.9129    
## Col_Eng_Term18/FA  1.05098    2.65440   0.396   0.6922    
## Col_Eng_Term19/FA  0.78360    2.65187   0.295   0.7677    
## Col_Eng_Term20/FA -0.02488    2.66058  -0.009   0.9925    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 4.558 on 1312 degrees of freedom
##   (1814 observations deleted due to missingness)
## Multiple R-squared:  0.02601,    Adjusted R-squared:  0.01859 
## F-statistic: 3.504 on 10 and 1312 DF,  p-value: 0.0001412
summary(actenglish)
## 
## Call:
## lm(formula = ACT_Engl ~ Col_Eng_Term, data = EnglC_Term)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -16.7457  -2.9736   0.0264   2.4764  17.3013 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)        19.3333     2.4937   7.753 1.79e-14 ***
## Col_Eng_Term11/FA  -3.8333     3.9429  -0.972    0.331    
## Col_Eng_Term12/FA   1.0000     3.5266   0.284    0.777    
## Col_Eng_Term13/FA   4.4000     2.7317   1.611    0.107    
## Col_Eng_Term14/FA   1.7843     2.5211   0.708    0.479    
## Col_Eng_Term15/FA   0.4250     2.5114   0.169    0.866    
## Col_Eng_Term16/FA  -0.3598     2.5101  -0.143    0.886    
## Col_Eng_Term17/FA  -0.6346     2.5100  -0.253    0.800    
## Col_Eng_Term18/FA  -0.5877     2.5152  -0.234    0.815    
## Col_Eng_Term19/FA  -0.8098     2.5132  -0.322    0.747    
## Col_Eng_Term20/FA  -1.2438     2.5215  -0.493    0.622    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 4.319 on 1313 degrees of freedom
##   (1813 observations deleted due to missingness)
## Multiple R-squared:  0.04885,    Adjusted R-squared:  0.04161 
## F-statistic: 6.744 on 10 and 1313 DF,  p-value: 2.648e-10
summary(mccannw)
## 
## Call:
## lm(formula = McCann_W ~ Col_Eng_Term, data = EnglC_Term)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.4412 -0.7578  0.1321  0.2422  1.6250 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)         6.0000     0.8102   7.405 5.82e-13 ***
## Col_Eng_Term15/FA  -2.0000     1.1458  -1.745   0.0815 .  
## Col_Eng_Term16/FA  -1.1240     0.8136  -1.382   0.1678    
## Col_Eng_Term17/FA  -1.2422     0.8128  -1.528   0.1271    
## Col_Eng_Term18/FA  -1.1321     0.8128  -1.393   0.1643    
## Col_Eng_Term19/FA  -1.5588     0.8221  -1.896   0.0585 .  
## Col_Eng_Term20/FA  -1.6250     0.8352  -1.946   0.0523 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.8102 on 486 degrees of freedom
##   (2644 observations deleted due to missingness)
## Multiple R-squared:  0.03335,    Adjusted R-squared:  0.02142 
## F-statistic: 2.795 on 6 and 486 DF,  p-value: 0.01107
summary(mccannr)
## 
## Call:
## lm(formula = McCann_R ~ Col_Eng_Term, data = EnglC_Term)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -48.313  -8.031  -0.467   6.969  51.687 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)        114.667      7.722  14.850   <2e-16 ***
## Col_Eng_Term12/FA   -2.667     15.443  -0.173   0.8630    
## Col_Eng_Term13/FA   35.333     15.443   2.288   0.0225 *  
## Col_Eng_Term15/FA   -5.167     12.209  -0.423   0.6723    
## Col_Eng_Term16/FA  -13.212      7.817  -1.690   0.0915 .  
## Col_Eng_Term17/FA  -15.200      7.791  -1.951   0.0516 .  
## Col_Eng_Term18/FA  -13.635      7.794  -1.749   0.0808 .  
## Col_Eng_Term19/FA  -16.353      7.860  -2.081   0.0379 *  
## Col_Eng_Term20/FA  -14.296      8.139  -1.756   0.0796 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 13.37 on 555 degrees of freedom
##   (2573 observations deleted due to missingness)
## Multiple R-squared:  0.03943,    Adjusted R-squared:  0.02558 
## F-statistic: 2.848 on 8 and 555 DF,  p-value: 0.004153
apa.reg.table(mccannr, filename = "table1.doc")
## 
## 
## Regression results using McCann_R as the criterion
##  
## 
##          Predictor        b        b_95%_CI sr2  sr2_95%_CI             Fit
##        (Intercept) 114.67** [99.50, 129.83]                                
##  Col_Eng_Term12/FA    -2.67 [-33.00, 27.67] .00 [-.00, .00]                
##  Col_Eng_Term13/FA   35.33*   [5.00, 65.67] .01 [-.01, .02]                
##  Col_Eng_Term15/FA    -5.17 [-29.15, 18.82] .00 [-.00, .00]                
##  Col_Eng_Term16/FA   -13.21  [-28.57, 2.14] .00 [-.01, .02]                
##  Col_Eng_Term17/FA   -15.20  [-30.50, 0.10] .01 [-.01, .02]                
##  Col_Eng_Term18/FA   -13.64  [-28.95, 1.67] .01 [-.01, .02]                
##  Col_Eng_Term19/FA  -16.35* [-31.79, -0.91] .01 [-.01, .02]                
##  Col_Eng_Term20/FA   -14.30  [-30.28, 1.69] .01 [-.01, .02]                
##                                                                 R2 = .039**
##                                                             95% CI[.00,.06]
##                                                                            
## 
## Note. A significant b-weight indicates the semi-partial correlation is also significant.
## b represents unstandardized regression weights. 
## sr2 represents the semi-partial correlation squared.
## Square brackets are used to enclose the lower and upper limits of a confidence interval.
## * indicates p < .05. ** indicates p < .01.
## 
gpatermmath<- lm(HSGPA ~ Col_Math_Term, data = PlacementMath)
acttermmath<- lm(ACT_Math ~ Col_Math_Term, data = PlacementMath)
aleksmath<- lm(ALEKS ~ Col_Math_Term, data = PlacementMath)

summary(gpatermmath)
## 
## Call:
## lm(formula = HSGPA ~ Col_Math_Term, data = PlacementMath)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.2856 -0.3257  0.0557  0.3883  1.8079 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)    
## (Intercept)         3.14265    0.04651  67.568   <2e-16 ***
## Col_Math_Term11/FA  0.04606    0.06316   0.729   0.4659    
## Col_Math_Term12/FA -0.02943    0.06516  -0.452   0.6516    
## Col_Math_Term13/FA -0.03835    0.05969  -0.643   0.5206    
## Col_Math_Term14/FA  0.06524    0.05974   1.092   0.2750    
## Col_Math_Term15/FA -0.14057    0.05625  -2.499   0.0125 *  
## Col_Math_Term16/FA  0.04874    0.05651   0.863   0.3885    
## Col_Math_Term17/FA  0.07224    0.05767   1.253   0.2104    
## Col_Math_Term18/FA  0.08967    0.05871   1.527   0.1268    
## Col_Math_Term19/FA  0.07847    0.05801   1.353   0.1762    
## Col_Math_Term20/FA -0.11784    0.05506  -2.140   0.0324 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.5303 on 2382 degrees of freedom
##   (422 observations deleted due to missingness)
## Multiple R-squared:  0.0244, Adjusted R-squared:  0.02031 
## F-statistic: 5.958 on 10 and 2382 DF,  p-value: 5.731e-09
summary(acttermmath)
## 
## Call:
## lm(formula = ACT_Math ~ Col_Math_Term, data = PlacementMath)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -8.3380 -3.0936 -0.2011  2.6620 12.7989 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)    
## (Intercept)          26.500      2.557  10.362  < 2e-16 ***
## Col_Math_Term12/FA   -0.500      4.429  -0.113  0.91015    
## Col_Math_Term13/FA   -5.000      3.617  -1.382  0.16713    
## Col_Math_Term14/FA   -3.162      2.593  -1.219  0.22300    
## Col_Math_Term15/FA   -5.861      2.581  -2.271  0.02336 *  
## Col_Math_Term16/FA   -6.406      2.572  -2.491  0.01292 *  
## Col_Math_Term17/FA   -5.607      2.572  -2.180  0.02947 *  
## Col_Math_Term18/FA   -5.968      2.575  -2.318  0.02067 *  
## Col_Math_Term19/FA   -5.917      2.575  -2.298  0.02179 *  
## Col_Math_Term20/FA   -7.299      2.571  -2.839  0.00462 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.617 on 998 degrees of freedom
##   (1807 observations deleted due to missingness)
## Multiple R-squared:  0.07469,    Adjusted R-squared:  0.06635 
## F-statistic: 8.951 on 9 and 998 DF,  p-value: 4.537e-13
summary(aleksmath)
## 
## Call:
## lm(formula = ALEKS ~ Col_Math_Term, data = PlacementMath)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -36.704 -10.859  -0.979   7.729  65.500 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)  
## (Intercept)          28.000     16.306   1.717   0.0873 .
## Col_Math_Term12/FA    8.000     23.059   0.347   0.7290  
## Col_Math_Term13/FA   11.000     23.059   0.477   0.6338  
## Col_Math_Term15/FA   10.333     18.828   0.549   0.5836  
## Col_Math_Term16/FA   20.979     16.474   1.273   0.2041  
## Col_Math_Term17/FA   18.545     16.490   1.125   0.2619  
## Col_Math_Term18/FA   13.704     16.605   0.825   0.4101  
## Col_Math_Term19/FA    2.195     16.503   0.133   0.8943  
## Col_Math_Term20/FA   -7.500     16.412  -0.457   0.6481  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 16.31 on 233 degrees of freedom
##   (2573 observations deleted due to missingness)
## Multiple R-squared:  0.3507, Adjusted R-squared:  0.3284 
## F-statistic: 15.73 on 8 and 233 DF,  p-value: < 2.2e-16
apa.reg.table(aleksmath, filename = "table1.doc")
## 
## 
## Regression results using ALEKS as the criterion
##  
## 
##           Predictor     b        b_95%_CI sr2  sr2_95%_CI             Fit
##         (Intercept) 28.00  [-4.13, 60.13]                                
##  Col_Math_Term12/FA  8.00 [-37.43, 53.43] .00 [-.00, .00]                
##  Col_Math_Term13/FA 11.00 [-34.43, 56.43] .00 [-.00, .01]                
##  Col_Math_Term15/FA 10.33 [-26.76, 47.43] .00 [-.01, .01]                
##  Col_Math_Term16/FA 20.98 [-11.48, 53.44] .00 [-.01, .02]                
##  Col_Math_Term17/FA 18.55 [-13.94, 51.03] .00 [-.01, .02]                
##  Col_Math_Term18/FA 13.70 [-19.01, 46.42] .00 [-.01, .01]                
##  Col_Math_Term19/FA  2.20 [-30.32, 34.71] .00 [-.00, .00]                
##  Col_Math_Term20/FA -7.50 [-39.84, 24.84] .00 [-.00, .01]                
##                                                               R2 = .351**
##                                                           95% CI[.24,.42]
##                                                                          
## 
## Note. A significant b-weight indicates the semi-partial correlation is also significant.
## b represents unstandardized regression weights. 
## sr2 represents the semi-partial correlation squared.
## Square brackets are used to enclose the lower and upper limits of a confidence interval.
## * indicates p < .05. ** indicates p < .01.
## 
library(questionr)
Placement2<- Placement %>%
  subset(Col_Eng_Term %in% c("10/FA", "11/FA", "12/FA", "13/FA", "14/FA", "15/FA", "16/FA", "17/FA", "18/FA", "19/FA", "20/FA"))%>%
  mutate(gpahave = if_else(!is.na (HSGPA), 1, 0))

Placement3<- Placement %>%
  subset(Col_Math_Term %in% c("10/FA", "11/FA", "12/FA", "13/FA", "14/FA", "15/FA", "16/FA", "17/FA", "18/FA", "19/FA", "20/FA"))%>%
  mutate(gpahave = if_else(!is.na (HSGPA), 1, 0))

EnglC_Term<- EnglC_Term %>%
  mutate(gpahave = if_else(!is.na (HSGPA), 1, 0)) %>%
  subset(Col_Eng_Term %in% c("14/FA", "15/FA", "16/FA", "17/FA", "18/FA", "19/FA", "20/FA"))


PlacementMath<- PlacementMath %>%
  mutate(gpahave = if_else(!is.na (HSGPA), 1, 0)) %>%
  subset(Col_Math_Term %in% c("14/FA", "15/FA", "16/FA", "17/FA", "18/FA", "19/FA", "20/FA"))

statistics<- statistics %>%
  mutate(gpahave = if_else(!is.na (HSGPA), 1, 0)) %>%
  subset(Col_Math_Term %in% c("14/FA", "15/FA", "16/FA", "17/FA", "18/FA", "19/FA", "20/FA"))

math1400<- math1400 %>%
  mutate(gpahave = if_else(!is.na (HSGPA), 1, 0)) %>%
  subset(Col_Math_Term %in% c("14/FA", "15/FA", "16/FA", "17/FA", "18/FA", "19/FA", "20/FA"))

chienglish<- CrossTable(Placement2$College_English_Pass, Placement2$gpahave, chisq = TRUE, prop.r = FALSE, prop.c = TRUE, expected = FALSE, prop.t = FALSE)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Col Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  3137 
## 
##  
##                                 | Placement2$gpahave 
## Placement2$College_English_Pass |         0 |         1 | Row Total | 
## --------------------------------|-----------|-----------|-----------|
##                               0 |        29 |       331 |       360 | 
##                                 |     0.578 |     0.059 |           | 
##                                 |     0.100 |     0.116 |           | 
## --------------------------------|-----------|-----------|-----------|
##                               1 |       262 |      2515 |      2777 | 
##                                 |     0.075 |     0.008 |           | 
##                                 |     0.900 |     0.884 |           | 
## --------------------------------|-----------|-----------|-----------|
##                    Column Total |       291 |      2846 |      3137 | 
##                                 |     0.093 |     0.907 |           | 
## --------------------------------|-----------|-----------|-----------|
## 
##  
## Statistics for All Table Factors
## 
## 
## Pearson's Chi-squared test 
## ------------------------------------------------------------
## Chi^2 =  0.7201912     d.f. =  1     p =  0.3960812 
## 
## Pearson's Chi-squared test with Yates' continuity correction 
## ------------------------------------------------------------
## Chi^2 =  0.5656451     d.f. =  1     p =  0.4519946 
## 
## 
chimath<- CrossTable(Placement3$College_Math_Pass, Placement3$gpahave, chisq = TRUE, prop.r = FALSE, prop.c = TRUE, expected = FALSE, prop.t = FALSE)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Col Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  2815 
## 
##  
##                              | Placement3$gpahave 
## Placement3$College_Math_Pass |         0 |         1 | Row Total | 
## -----------------------------|-----------|-----------|-----------|
##                            0 |        63 |       460 |       523 | 
##                              |     3.026 |     0.534 |           | 
##                              |     0.149 |     0.192 |           | 
## -----------------------------|-----------|-----------|-----------|
##                            1 |       359 |      1933 |      2292 | 
##                              |     0.691 |     0.122 |           | 
##                              |     0.851 |     0.808 |           | 
## -----------------------------|-----------|-----------|-----------|
##                 Column Total |       422 |      2393 |      2815 | 
##                              |     0.150 |     0.850 |           | 
## -----------------------------|-----------|-----------|-----------|
## 
##  
## Statistics for All Table Factors
## 
## 
## Pearson's Chi-squared test 
## ------------------------------------------------------------
## Chi^2 =  4.372255     d.f. =  1     p =  0.03652861 
## 
## Pearson's Chi-squared test with Yates' continuity correction 
## ------------------------------------------------------------
## Chi^2 =  4.093015     d.f. =  1     p =  0.04306076 
## 
## 
chistat<- CrossTable(statistics$College_Math_Pass, statistics$gpahave, chisq = TRUE, prop.r = FALSE, prop.c = TRUE, expected = FALSE, prop.t = FALSE)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Col Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  525 
## 
##  
##                              | statistics$gpahave 
## statistics$College_Math_Pass |         0 |         1 | Row Total | 
## -----------------------------|-----------|-----------|-----------|
##                            0 |         7 |        59 |        66 | 
##                              |     0.683 |     0.116 |           | 
##                              |     0.092 |     0.131 |           | 
## -----------------------------|-----------|-----------|-----------|
##                            1 |        69 |       390 |       459 | 
##                              |     0.098 |     0.017 |           | 
##                              |     0.908 |     0.869 |           | 
## -----------------------------|-----------|-----------|-----------|
##                 Column Total |        76 |       449 |       525 | 
##                              |     0.145 |     0.855 |           | 
## -----------------------------|-----------|-----------|-----------|
## 
##  
## Statistics for All Table Factors
## 
## 
## Pearson's Chi-squared test 
## ------------------------------------------------------------
## Chi^2 =  0.9132723     d.f. =  1     p =  0.3392477 
## 
## Pearson's Chi-squared test with Yates' continuity correction 
## ------------------------------------------------------------
## Chi^2 =  0.5907219     d.f. =  1     p =  0.4421401 
## 
## 
chi14<- CrossTable(math1400$College_Math_Pass, math1400$gpahave, chisq = TRUE, prop.r = FALSE, prop.c = TRUE, expected = FALSE, prop.t = FALSE)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Col Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  1359 
## 
##  
##                            | math1400$gpahave 
## math1400$College_Math_Pass |         0 |         1 | Row Total | 
## ---------------------------|-----------|-----------|-----------|
##                          0 |        16 |       240 |       256 | 
##                            |     3.161 |     0.340 |           | 
##                            |     0.121 |     0.196 |           | 
## ---------------------------|-----------|-----------|-----------|
##                          1 |       116 |       987 |      1103 | 
##                            |     0.734 |     0.079 |           | 
##                            |     0.879 |     0.804 |           | 
## ---------------------------|-----------|-----------|-----------|
##               Column Total |       132 |      1227 |      1359 | 
##                            |     0.097 |     0.903 |           | 
## ---------------------------|-----------|-----------|-----------|
## 
##  
## Statistics for All Table Factors
## 
## 
## Pearson's Chi-squared test 
## ------------------------------------------------------------
## Chi^2 =  4.313357     d.f. =  1     p =  0.03781427 
## 
## Pearson's Chi-squared test with Yates' continuity correction 
## ------------------------------------------------------------
## Chi^2 =  3.840536     d.f. =  1     p =  0.05002753 
## 
## 
chienglish
## $t
##    y
## x      0    1
##   0   29  331
##   1  262 2515
## 
## $prop.row
##    y
## x            0          1
##   0 0.08055556 0.91944444
##   1 0.09434642 0.90565358
## 
## $prop.col
##    y
## x            0          1
##   0 0.09965636 0.11630358
##   1 0.90034364 0.88369642
## 
## $prop.tbl
##    y
## x             0           1
##   0 0.009244501 0.105514823
##   1 0.083519286 0.801721390
## 
## $chisq
## 
##  Pearson's Chi-squared test
## 
## data:  t
## X-squared = 0.72019, df = 1, p-value = 0.3961
## 
## 
## $chisq.corr
## 
##  Pearson's Chi-squared test with Yates' continuity correction
## 
## data:  t
## X-squared = 0.56565, df = 1, p-value = 0.452
chimath
## $t
##    y
## x      0    1
##   0   63  460
##   1  359 1933
## 
## $prop.row
##    y
## x           0         1
##   0 0.1204589 0.8795411
##   1 0.1566318 0.8433682
## 
## $prop.col
##    y
## x           0         1
##   0 0.1492891 0.1922273
##   1 0.8507109 0.8077727
## 
## $prop.tbl
##    y
## x            0          1
##   0 0.02238011 0.16341030
##   1 0.12753108 0.68667851
## 
## $chisq
## 
##  Pearson's Chi-squared test
## 
## data:  t
## X-squared = 4.3723, df = 1, p-value = 0.03653
## 
## 
## $chisq.corr
## 
##  Pearson's Chi-squared test with Yates' continuity correction
## 
## data:  t
## X-squared = 4.093, df = 1, p-value = 0.04306
chistat
## $t
##    y
## x     0   1
##   0   7  59
##   1  69 390
## 
## $prop.row
##    y
## x           0         1
##   0 0.1060606 0.8939394
##   1 0.1503268 0.8496732
## 
## $prop.col
##    y
## x            0          1
##   0 0.09210526 0.13140312
##   1 0.90789474 0.86859688
## 
## $prop.tbl
##    y
## x            0          1
##   0 0.01333333 0.11238095
##   1 0.13142857 0.74285714
## 
## $chisq
## 
##  Pearson's Chi-squared test
## 
## data:  t
## X-squared = 0.91327, df = 1, p-value = 0.3392
## 
## 
## $chisq.corr
## 
##  Pearson's Chi-squared test with Yates' continuity correction
## 
## data:  t
## X-squared = 0.59072, df = 1, p-value = 0.4421
chi14
## $t
##    y
## x     0   1
##   0  16 240
##   1 116 987
## 
## $prop.row
##    y
## x           0         1
##   0 0.0625000 0.9375000
##   1 0.1051677 0.8948323
## 
## $prop.col
##    y
## x           0         1
##   0 0.1212121 0.1955990
##   1 0.8787879 0.8044010
## 
## $prop.tbl
##    y
## x            0          1
##   0 0.01177336 0.17660044
##   1 0.08535688 0.72626932
## 
## $chisq
## 
##  Pearson's Chi-squared test
## 
## data:  t
## X-squared = 4.3134, df = 1, p-value = 0.03781
## 
## 
## $chisq.corr
## 
##  Pearson's Chi-squared test with Yates' continuity correction
## 
## data:  t
## X-squared = 3.8405, df = 1, p-value = 0.05003
Enggpa<- glm(formula = College_English_Pass ~ Col_Eng_Term +  gpahave + ACT_Engl + ACT_Reading + McCann_R + McCann_W, family = "binomial", data = EnglC_Term)
summary(Enggpa)
## 
## Call:
## glm(formula = College_English_Pass ~ Col_Eng_Term + gpahave + 
##     ACT_Engl + ACT_Reading + McCann_R + McCann_W, family = "binomial", 
##     data = EnglC_Term)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.2985   0.4179   0.5709   0.6579   1.2734  
## 
## Coefficients:
##                   Estimate Std. Error z value Pr(>|z|)
## (Intercept)       -2.76710    1.84514  -1.500    0.134
## Col_Eng_Term17/FA  0.08835    0.45887   0.193    0.847
## Col_Eng_Term18/FA  0.32949    0.48424   0.680    0.496
## Col_Eng_Term19/FA  0.17479    0.69801   0.250    0.802
## Col_Eng_Term20/FA  0.60680    1.13808   0.533    0.594
## gpahave            0.67761    0.72106   0.940    0.347
## ACT_Engl           0.08763    0.06092   1.439    0.150
## ACT_Reading       -0.03872    0.05989  -0.646    0.518
## McCann_R           0.02401    0.01725   1.392    0.164
## McCann_W           0.09801    0.21433   0.457    0.647
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 231.47  on 246  degrees of freedom
## Residual deviance: 222.38  on 237  degrees of freedom
##   (1931 observations deleted due to missingness)
## AIC: 242.38
## 
## Number of Fisher Scoring iterations: 4
enggpaoddrat<- odds.ratio(Enggpa)
enggpaoddrat
##                         OR    2.5 %  97.5 %      p
## (Intercept)       0.062844 0.001537  2.2522 0.1337
## Col_Eng_Term17/FA 1.092371 0.432271  2.6532 0.8473
## Col_Eng_Term18/FA 1.390262 0.529258  3.5991 0.4962
## Col_Eng_Term19/FA 1.190999 0.319489  5.2158 0.8023
## Col_Eng_Term20/FA 1.834557 0.270531 36.8383 0.5939
## gpahave           1.969159 0.403562  7.4790 0.3474
## ACT_Engl          1.091584 0.970979  1.2341 0.1503
## ACT_Reading       0.962022 0.855134  1.0826 0.5180
## McCann_R          1.024298 0.990725  1.0604 0.1639
## McCann_W          1.102975 0.722109  1.6807 0.6475
VIF(Enggpa)
##                  GVIF Df GVIF^(1/(2*Df))
## Col_Eng_Term 1.123352  4        1.014646
## gpahave      1.069883  1        1.034352
## ACT_Engl     1.731680  1        1.315933
## ACT_Reading  1.627449  1        1.275715
## McCann_R     1.376891  1        1.173410
## McCann_W     1.104385  1        1.050897
PseudoR2(Enggpa)
##   McFadden 
## 0.03926004
EngMod<- glm(formula = College_English_Pass ~ Col_Eng_Term + HSGPA + ACT_Engl + ACT_Reading + McCann_R + McCann_W, family = "binomial", data = EnglC_Term)
summary(EngMod)
## 
## Call:
## glm(formula = College_English_Pass ~ Col_Eng_Term + HSGPA + ACT_Engl + 
##     ACT_Reading + McCann_R + McCann_W, family = "binomial", data = EnglC_Term)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.4856   0.3108   0.5105   0.6572   1.5517  
## 
## Coefficients:
##                    Estimate Std. Error z value Pr(>|z|)   
## (Intercept)       -4.728047   1.963976  -2.407  0.01607 * 
## Col_Eng_Term17/FA  0.035306   0.482152   0.073  0.94163   
## Col_Eng_Term18/FA  0.341419   0.525484   0.650  0.51587   
## Col_Eng_Term19/FA  0.006747   0.731056   0.009  0.99264   
## Col_Eng_Term20/FA  0.375553   1.216830   0.309  0.75760   
## HSGPA              1.394153   0.482860   2.887  0.00389 **
## ACT_Engl           0.028320   0.066913   0.423  0.67213   
## ACT_Reading       -0.080679   0.068226  -1.183  0.23700   
## McCann_R           0.032547   0.018267   1.782  0.07479 . 
## McCann_W           0.090782   0.230161   0.394  0.69326   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 217.18  on 233  degrees of freedom
## Residual deviance: 199.43  on 224  degrees of freedom
##   (1944 observations deleted due to missingness)
## AIC: 219.43
## 
## Number of Fisher Scoring iterations: 5
engoddrat<- odds.ratio(EngMod)
engoddrat
##                           OR      2.5 %  97.5 %        p   
## (Intercept)       0.00884372 0.00015641  0.3681 0.016067 * 
## Col_Eng_Term17/FA 1.03593655 0.38960235  2.6245 0.941627   
## Col_Eng_Term18/FA 1.40694256 0.49369615  3.9609 0.515871   
## Col_Eng_Term19/FA 1.00676939 0.25075291  4.6681 0.992637   
## Col_Eng_Term20/FA 1.45579602 0.17932599 32.1151 0.757601   
## HSGPA             4.03155729 1.60660668 10.7506 0.003886 **
## ACT_Engl          1.02872455 0.90294616  1.1752 0.672128   
## ACT_Reading       0.92248967 0.80600698  1.0546 0.236995   
## McCann_R          1.03308222 0.99751916  1.0720 0.074795 . 
## McCann_W          1.09503078 0.69590177  1.7244 0.693263   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
VIF(EngMod)
##                  GVIF Df GVIF^(1/(2*Df))
## Col_Eng_Term 1.143190  4        1.016868
## HSGPA        1.223051  1        1.105916
## ACT_Engl     1.582757  1        1.258077
## ACT_Reading  1.633985  1        1.278274
## McCann_R     1.355942  1        1.164449
## McCann_W     1.164407  1        1.079077
PseudoR2(EngMod)
##   McFadden 
## 0.08171396
EngMod2<- glm(formula = College_English_Pass ~ Col_Eng_Term +  HSGPA + ACT_Engl + ACT_Reading, family = "binomial", data = EnglC_Term)
summary(EngMod2)
## 
## Call:
## glm(formula = College_English_Pass ~ Col_Eng_Term + HSGPA + ACT_Engl + 
##     ACT_Reading, family = "binomial", data = EnglC_Term)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.6679   0.2560   0.3814   0.5468   1.4893  
## 
## Coefficients:
##                   Estimate Std. Error z value Pr(>|z|)    
## (Intercept)       -2.77889    0.69333  -4.008 6.12e-05 ***
## Col_Eng_Term15/FA -0.61323    0.40633  -1.509   0.1312    
## Col_Eng_Term16/FA -0.05321    0.41755  -0.127   0.8986    
## Col_Eng_Term17/FA -0.32160    0.40213  -0.800   0.4238    
## Col_Eng_Term18/FA -0.17850    0.42757  -0.417   0.6763    
## Col_Eng_Term19/FA -0.33630    0.41781  -0.805   0.4209    
## Col_Eng_Term20/FA -0.87053    0.41699  -2.088   0.0368 *  
## HSGPA              1.75777    0.18747   9.376  < 2e-16 ***
## ACT_Engl          -0.01552    0.03032  -0.512   0.6087    
## ACT_Reading        0.01400    0.02862   0.489   0.6247    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 982.02  on 1259  degrees of freedom
## Residual deviance: 856.67  on 1250  degrees of freedom
##   (918 observations deleted due to missingness)
## AIC: 876.67
## 
## Number of Fisher Scoring iterations: 5
engoddrat2<- odds.ratio(EngMod2)
engoddrat2
##                         OR    2.5 % 97.5 %         p    
## (Intercept)       0.062108 0.015875 0.2422 6.123e-05 ***
## Col_Eng_Term15/FA 0.541599 0.234159 1.1679   0.13125    
## Col_Eng_Term16/FA 0.948184 0.402991 2.1023   0.89860    
## Col_Eng_Term17/FA 0.724985 0.315799 1.5493   0.42385    
## Col_Eng_Term18/FA 0.836520 0.349712 1.8980   0.67632    
## Col_Eng_Term19/FA 0.714407 0.303243 1.5828   0.42086    
## Col_Eng_Term20/FA 0.418729 0.177728 0.9238   0.03683 *  
## HSGPA             5.799485 4.039452 8.4314 < 2.2e-16 ***
## ACT_Engl          0.984598 0.927612 1.0447   0.60866    
## ACT_Reading       1.014100 0.959045 1.0730   0.62470    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
VIF(EngMod2)
##                  GVIF Df GVIF^(1/(2*Df))
## Col_Eng_Term 1.062018  6        1.005027
## HSGPA        1.127473  1        1.061825
## ACT_Engl     2.060378  1        1.435402
## ACT_Reading  2.009945  1        1.417725
PseudoR2(EngMod2)
##  McFadden 
## 0.1276496
EngMod3<- glm(formula = College_English_Pass ~ Col_Eng_Term + HSGPA + ACT_Reading, family = "binomial", data = EnglC_Term)
summary(EngMod3)
## 
## Call:
## glm(formula = College_English_Pass ~ Col_Eng_Term + HSGPA + ACT_Reading, 
##     family = "binomial", data = EnglC_Term)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.6711   0.2552   0.3809   0.5513   1.5120  
## 
## Coefficients:
##                    Estimate Std. Error z value Pr(>|z|)    
## (Intercept)       -2.864309   0.681706  -4.202 2.65e-05 ***
## Col_Eng_Term15/FA -0.609819   0.405753  -1.503   0.1329    
## Col_Eng_Term16/FA -0.037847   0.416388  -0.091   0.9276    
## Col_Eng_Term17/FA -0.303864   0.400861  -0.758   0.4484    
## Col_Eng_Term18/FA -0.162807   0.425626  -0.383   0.7021    
## Col_Eng_Term19/FA -0.305602   0.415365  -0.736   0.4619    
## Col_Eng_Term20/FA -0.892241   0.413249  -2.159   0.0308 *  
## HSGPA              1.740912   0.185277   9.396  < 2e-16 ***
## ACT_Reading        0.005766   0.021268   0.271   0.7863    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 987.21  on 1264  degrees of freedom
## Residual deviance: 860.76  on 1256  degrees of freedom
##   (913 observations deleted due to missingness)
## AIC: 878.76
## 
## Number of Fisher Scoring iterations: 5
engoddrat3<- odds.ratio(EngMod3)
engoddrat3
##                         OR    2.5 % 97.5 %         p    
## (Intercept)       0.057023 0.014927 0.2176 2.649e-05 ***
## Col_Eng_Term15/FA 0.543449 0.235187 1.1705   0.13286    
## Col_Eng_Term16/FA 0.962860 0.410035 2.1295   0.92758    
## Col_Eng_Term17/FA 0.737961 0.322118 1.5726   0.44843    
## Col_Eng_Term18/FA 0.849755 0.356459 1.9203   0.70208    
## Col_Eng_Term19/FA 0.736680 0.314026 1.6237   0.46189    
## Col_Eng_Term20/FA 0.409737 0.175007 0.8965   0.03084 *  
## HSGPA             5.702539 3.989012 8.2546 < 2.2e-16 ***
## ACT_Reading       1.005782 0.965029 1.0490   0.78632    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
VIF(EngMod3)
##                  GVIF Df GVIF^(1/(2*Df))
## Col_Eng_Term 1.044827  6        1.003661
## HSGPA        1.100492  1        1.049043
## ACT_Reading  1.110238  1        1.053678
PseudoR2(EngMod3)
##  McFadden 
## 0.1280876
EngMod4<- glm(formula = College_English_Pass ~ Col_Eng_Term + HSGPA, family = "binomial", data = Placement2)
summary(EngMod4)
## 
## Call:
## glm(formula = College_English_Pass ~ Col_Eng_Term + HSGPA, family = "binomial", 
##     data = Placement2)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.6739   0.2969   0.4031   0.5383   1.2404  
## 
## Coefficients:
##                   Estimate Std. Error z value Pr(>|z|)    
## (Intercept)        -0.7702     0.4182  -1.841 0.065553 .  
## Col_Eng_Term11/FA  -0.3101     0.3796  -0.817 0.413979    
## Col_Eng_Term12/FA  -0.6210     0.3732  -1.664 0.096055 .  
## Col_Eng_Term13/FA  -0.4619     0.3809  -1.213 0.225171    
## Col_Eng_Term14/FA  -0.1837     0.3752  -0.490 0.624463    
## Col_Eng_Term15/FA  -0.9562     0.3218  -2.972 0.002961 ** 
## Col_Eng_Term16/FA  -0.8325     0.3253  -2.559 0.010488 *  
## Col_Eng_Term17/FA  -0.7519     0.3263  -2.304 0.021211 *  
## Col_Eng_Term18/FA  -0.6018     0.3383  -1.779 0.075217 .  
## Col_Eng_Term19/FA  -0.5544     0.3387  -1.637 0.101711    
## Col_Eng_Term20/FA  -1.1910     0.3301  -3.608 0.000308 ***
## HSGPA               1.2095     0.1131  10.698  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 2046.2  on 2845  degrees of freedom
## Residual deviance: 1886.8  on 2834  degrees of freedom
##   (291 observations deleted due to missingness)
## AIC: 1910.8
## 
## Number of Fisher Scoring iterations: 5
engoddrat4<- odds.ratio(EngMod4)
VIF(EngMod4)
##                  GVIF Df GVIF^(1/(2*Df))
## Col_Eng_Term 1.011344 10        1.000564
## HSGPA        1.011344  1        1.005656
engoddrat4
##                        OR   2.5 % 97.5 %         p    
## (Intercept)       0.46293 0.20699 1.0723  0.065553 .  
## Col_Eng_Term11/FA 0.73338 0.34366 1.5416  0.413979    
## Col_Eng_Term12/FA 0.53738 0.25425 1.1109  0.096055 .  
## Col_Eng_Term13/FA 0.63006 0.29454 1.3276  0.225171    
## Col_Eng_Term14/FA 0.83220 0.39275 1.7310  0.624463    
## Col_Eng_Term15/FA 0.38434 0.19778 0.7043  0.002961 ** 
## Col_Eng_Term16/FA 0.43494 0.22253 0.8037  0.010488 *  
## Col_Eng_Term17/FA 0.47149 0.24085 0.8733  0.021211 *  
## Col_Eng_Term18/FA 0.54780 0.27438 1.0433  0.075217 .  
## Col_Eng_Term19/FA 0.57444 0.28754 1.0953  0.101711    
## Col_Eng_Term20/FA 0.30392 0.15421 0.5673  0.000308 ***
## HSGPA             3.35182 2.69044 4.1919 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
PseudoR2(EngMod4)
##   McFadden 
## 0.07792522
write.csv(enggpaoddrat, "enggpa.csv")
write.csv(engoddrat, "engmod.csv")
write.csv(engoddrat2, "engmod2.csv")
write.csv(engoddrat3, "engmod3.csv")
write.csv(engoddrat4, "engmod4.csv")
Mathgpa<- glm(formula = College_Math_Pass ~ Col_Math_Term + gpahave + ACT_Math, family = "binomial", data = PlacementMath)
summary(Mathgpa)
## 
## Call:
## glm(formula = College_Math_Pass ~ Col_Math_Term + gpahave + ACT_Math, 
##     family = "binomial", data = PlacementMath)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.0572   0.5493   0.6303   0.6955   0.8758  
## 
## Coefficients:
##                    Estimate Std. Error z value Pr(>|z|)  
## (Intercept)         0.84971    0.79322   1.071   0.2841  
## Col_Math_Term15/FA -0.15958    0.41431  -0.385   0.7001  
## Col_Math_Term16/FA -0.08110    0.38975  -0.208   0.8352  
## Col_Math_Term17/FA -0.07779    0.38651  -0.201   0.8405  
## Col_Math_Term18/FA  0.08466    0.40537   0.209   0.8346  
## Col_Math_Term19/FA -0.39331    0.38829  -1.013   0.3111  
## Col_Math_Term20/FA -0.37461    0.38158  -0.982   0.3262  
## gpahave            -0.21828    0.49882  -0.438   0.6617  
## ACT_Math            0.04579    0.02245   2.040   0.0413 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 999.36  on 1002  degrees of freedom
## Residual deviance: 988.62  on  994  degrees of freedom
##   (994 observations deleted due to missingness)
## AIC: 1006.6
## 
## Number of Fisher Scoring iterations: 4
mathgpaodd<- odds.ratio(Mathgpa)
mathgpaodd
##                         OR   2.5 %  97.5 %       p  
## (Intercept)        2.33897 0.51199 11.7006 0.28407  
## Col_Math_Term15/FA 0.85250 0.36782  1.8911 0.70012  
## Col_Math_Term16/FA 0.92210 0.41434  1.9329 0.83516  
## Col_Math_Term17/FA 0.92516 0.41808  1.9261 0.84049  
## Col_Math_Term18/FA 1.08835 0.47686  2.3672 0.83456  
## Col_Math_Term19/FA 0.67482 0.30389  1.4094 0.31110  
## Col_Math_Term20/FA 0.68756 0.31299  1.4135 0.32624  
## gpahave            0.80390 0.26763  1.9716 0.66168  
## ACT_Math           1.04686 1.00221  1.0945 0.04134 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
VIF(Mathgpa)
##                   GVIF Df GVIF^(1/(2*Df))
## Col_Math_Term 1.077427  6        1.006234
## gpahave       1.006022  1        1.003007
## ACT_Math      1.071883  1        1.035318
PseudoR2(Mathgpa)
##   McFadden 
## 0.01074682
PlacementMath2<- PlacementMath%>%
  select(College_Math_Pass, Col_Math_Term, HSGPA, ACT_Math)
PlacementMath2<- na.omit(PlacementMath2)
MathMod<- glm(formula = College_Math_Pass ~ Col_Math_Term + HSGPA + ACT_Math, family = "binomial", data = PlacementMath2)
summary(MathMod)
## 
## Call:
## glm(formula = College_Math_Pass ~ Col_Math_Term + HSGPA + ACT_Math, 
##     family = "binomial", data = PlacementMath2)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.2832   0.4035   0.5374   0.6789   1.5332  
## 
## Coefficients:
##                     Estimate Std. Error z value Pr(>|z|)    
## (Intercept)        -2.906429   0.806690  -3.603 0.000315 ***
## Col_Math_Term15/FA -0.056090   0.432771  -0.130 0.896878    
## Col_Math_Term16/FA -0.119278   0.406212  -0.294 0.769037    
## Col_Math_Term17/FA -0.065133   0.400549  -0.163 0.870825    
## Col_Math_Term18/FA  0.147877   0.420890   0.351 0.725331    
## Col_Math_Term19/FA -0.432841   0.401770  -1.077 0.281331    
## Col_Math_Term20/FA -0.146013   0.400223  -0.365 0.715238    
## HSGPA               1.355439   0.185332   7.314  2.6e-13 ***
## ACT_Math            0.004501   0.024097   0.187 0.851824    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 971.67  on 971  degrees of freedom
## Residual deviance: 905.11  on 963  degrees of freedom
## AIC: 923.11
## 
## Number of Fisher Scoring iterations: 4
mathodd<- odds.ratio(MathMod)
mathodd
##                          OR    2.5 % 97.5 %         p    
## (Intercept)        0.054671 0.011099 0.2637 0.0003147 ***
## Col_Math_Term15/FA 0.945454 0.394586 2.1795 0.8968776    
## Col_Math_Term16/FA 0.887561 0.386980 1.9242 0.7690370    
## Col_Math_Term17/FA 0.936942 0.412704 2.0075 0.8708252    
## Col_Math_Term18/FA 1.159370 0.493805 2.6033 0.7253312    
## Col_Math_Term19/FA 0.648664 0.284884 1.3918 0.2813310    
## Col_Math_Term20/FA 0.864146 0.380808 1.8493 0.7152380    
## HSGPA              3.878464 2.707441 5.6042 2.601e-13 ***
## ACT_Math           1.004511 0.958361 1.0534 0.8518237    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
VIF(MathMod)
##                   GVIF Df GVIF^(1/(2*Df))
## Col_Math_Term 1.126722  6        1.009992
## HSGPA         1.093292  1        1.045606
## ACT_Math      1.131525  1        1.063732
PseudoR2(MathMod)
##   McFadden 
## 0.06849917
hoslem.test(PlacementMath2$College_Math_Pass, fitted(MathMod), g=10)
## 
##  Hosmer and Lemeshow goodness of fit (GOF) test
## 
## data:  PlacementMath2$College_Math_Pass, fitted(MathMod)
## X-squared = 17.637, df = 8, p-value = 0.02412
PlacementMath3<- Placement3%>%
  select(College_Math_Pass, Col_Math_Term, HSGPA)
PlacementMath3<- na.omit(PlacementMath3)
MathMod2<- glm(formula = College_Math_Pass ~ Col_Math_Term + HSGPA, family = "binomial", data = Placement3)
summary(MathMod2)
## 
## Call:
## glm(formula = College_Math_Pass ~ Col_Math_Term + HSGPA, family = "binomial", 
##     data = Placement3)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.3266   0.4447   0.5640   0.6757   1.3082  
## 
## Coefficients:
##                    Estimate Std. Error z value Pr(>|z|)    
## (Intercept)        -0.77434    0.37804  -2.048   0.0405 *  
## Col_Math_Term11/FA -0.58493    0.31517  -1.856   0.0635 .  
## Col_Math_Term12/FA -0.62795    0.31979  -1.964   0.0496 *  
## Col_Math_Term13/FA -0.48575    0.30127  -1.612   0.1069    
## Col_Math_Term14/FA  0.22310    0.33160   0.673   0.5011    
## Col_Math_Term15/FA -0.04802    0.29517  -0.163   0.8708    
## Col_Math_Term16/FA -0.20209    0.29670  -0.681   0.4958    
## Col_Math_Term17/FA -0.14389    0.30492  -0.472   0.6370    
## Col_Math_Term18/FA -0.15084    0.31065  -0.486   0.6273    
## Col_Math_Term19/FA -0.55056    0.29556  -1.863   0.0625 .  
## Col_Math_Term20/FA -0.47969    0.28143  -1.704   0.0883 .  
## HSGPA               0.81408    0.09660   8.427   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 2342.4  on 2392  degrees of freedom
## Residual deviance: 2245.2  on 2381  degrees of freedom
##   (422 observations deleted due to missingness)
## AIC: 2269.2
## 
## Number of Fisher Scoring iterations: 4
mathodd2<- odds.ratio(MathMod2)
mathodd2
##                         OR   2.5 % 97.5 %       p    
## (Intercept)        0.46101 0.22146 0.9779 0.04053 *  
## Col_Math_Term11/FA 0.55715 0.29616 1.0241 0.06346 .  
## Col_Math_Term12/FA 0.53369 0.28137 0.9908 0.04957 *  
## Col_Math_Term13/FA 0.61524 0.33516 1.0972 0.10689    
## Col_Math_Term14/FA 1.24994 0.64741 2.3915 0.50108    
## Col_Math_Term15/FA 0.95311 0.52510 1.6787 0.87076    
## Col_Math_Term16/FA 0.81702 0.44880 1.4434 0.49580    
## Col_Math_Term17/FA 0.86598 0.46903 1.5582 0.63700    
## Col_Math_Term18/FA 0.85999 0.46122 1.5673 0.62728    
## Col_Math_Term19/FA 0.57663 0.31721 1.0154 0.06249 .  
## Col_Math_Term20/FA 0.61898 0.34912 1.0573 0.08830 .  
## HSGPA              2.25709 1.86894 2.7299 < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
VIF(MathMod2)
##                   GVIF Df GVIF^(1/(2*Df))
## Col_Math_Term 1.031631 10        1.001558
## HSGPA         1.031631  1        1.015692
PseudoR2(MathMod2)
##   McFadden 
## 0.04151638
hoslem.test(PlacementMath3$College_Math_Pass, fitted(MathMod2), g=10)
## 
##  Hosmer and Lemeshow goodness of fit (GOF) test
## 
## data:  PlacementMath3$College_Math_Pass, fitted(MathMod2)
## X-squared = 23.266, df = 8, p-value = 0.003039
write.csv(mathgpaodd, "mathgpa.csv")
write.csv(mathodd, "mathmod.csv")
write.csv(mathodd2, "mathmod2.csv")
describe.by(math1400, math1400$Col_Math_Term)
## 
##  Descriptive statistics by group 
## group: 14/FA
##                              vars   n    mean      sd  median trimmed     mad
## LCCCGPA                         1 178    2.92    0.81    3.16    3.02    0.63
## HSGPA                           2 152    3.22    0.52    3.26    3.25    0.54
## HighSchoolEndYear               3 178 2009.91    6.47 2013.00 2011.19    1.48
## HSDate*                         4 178   13.28    4.99   14.00   13.38    1.48
## StartTerm*                      5 178   21.05    5.94   22.00   21.97    4.45
## StartDate*                      6 178   19.02    6.85   23.00   20.04    1.48
## HSGradYears*                    7 178   16.18   12.10   11.00   14.62    2.97
## CourseName.x*                   8   0     NaN      NA      NA     NaN      NA
## Developmental_English_Grade*    9   0     NaN      NA      NA     NaN      NA
## Location*                      10   0     NaN      NA      NA     NaN      NA
## Dev_Eng_Term*                  11   0     NaN      NA      NA     NaN      NA
## Developmental_English_Pass     12   0     NaN      NA      NA     NaN      NA
## DevEnglGradeNumber             13   0     NaN      NA      NA     NaN      NA
## CourseName.y*                  14  98    1.00    0.00    1.00    1.00    0.00
## College_English_Grade*         15  98    1.96    1.16    2.00    1.76    1.48
## Col_Eng_Term*                  16  98    6.71    1.95    7.00    6.72    1.48
## College_English_Pass           17  98    0.92    0.28    1.00    1.00    0.00
## ColEnglGradeNumber             18  98    3.04    1.16    3.00    3.24    1.48
## CourseName.x.x*                19  17    1.88    0.33    2.00    1.93    0.00
## Developmental_Math_Grade*      20  17    1.53    0.72    1.00    1.47    0.00
## Dev_Math_Term*                 21  17    3.94    1.98    4.00    3.87    1.48
## Developmental_Math_Pass        22  17    1.00    0.00    1.00    1.00    0.00
## DevMathGradeNumber             23  17    3.47    0.72    4.00    3.53    0.00
## CourseName.y.y*                24 178    1.00    0.00    1.00    1.00    0.00
## College_Math_Grade*            25 178    2.38    1.20    2.00    2.25    1.48
## Col_Math_Term*                 26 178    1.00    0.00    1.00    1.00    0.00
## College_Math_Pass              27 178    0.86    0.35    1.00    0.94    0.00
## ColMathGradeNumber             28 178    2.62    1.20    3.00    2.75    1.48
## ALEKS                          29   0     NaN      NA      NA     NaN      NA
## ACT_Math                       30  69   23.42    3.03   24.00   23.56    2.97
## ACT_Reading                    31  68   23.69    4.21   23.00   23.62    4.45
## ACT_Engl                       32  68   23.00    3.38   23.00   22.84    2.97
## McCann_R                       33   0     NaN      NA      NA     NaN      NA
## McCann_W                       34   0     NaN      NA      NA     NaN      NA
## AnonId                         35 178 4190.68 2369.95 4292.50 4157.11 2749.48
## EnglishStart                   36  98    0.43    0.50    0.00    0.41    0.00
## MathStart                      37 178    0.34    0.48    0.00    0.31    0.00
## gpahave                        38 178    0.85    0.35    1.00    0.94    0.00
##                                  min     max   range  skew kurtosis     se
## LCCCGPA                         0.00    4.00    4.00 -1.18     1.33   0.06
## HSGPA                           1.83    4.09    2.26 -0.46    -0.60   0.04
## HighSchoolEndYear            1982.00 2016.00   34.00 -2.04     4.25   0.48
## HSDate*                         1.00   28.00   27.00  0.01     1.59   0.37
## StartTerm*                      1.00   32.00   31.00 -1.40     1.64   0.45
## StartDate*                      1.00   27.00   26.00 -1.10    -0.32   0.51
## HSGradYears*                    1.00   48.00   47.00  1.21     0.31   0.91
## CourseName.x*                    Inf    -Inf    -Inf    NA       NA     NA
## Developmental_English_Grade*     Inf    -Inf    -Inf    NA       NA     NA
## Location*                        Inf    -Inf    -Inf    NA       NA     NA
## Dev_Eng_Term*                    Inf    -Inf    -Inf    NA       NA     NA
## Developmental_English_Pass       Inf    -Inf    -Inf    NA       NA     NA
## DevEnglGradeNumber               Inf    -Inf    -Inf    NA       NA     NA
## CourseName.y*                   1.00    1.00    0.00   NaN      NaN   0.00
## College_English_Grade*          1.00    5.00    4.00  1.22     0.84   0.12
## Col_Eng_Term*                   1.00   12.00   11.00 -0.09     0.51   0.20
## College_English_Pass            0.00    1.00    1.00 -3.01     7.13   0.03
## ColEnglGradeNumber              0.00    4.00    4.00 -1.22     0.84   0.12
## CourseName.x.x*                 1.00    2.00    1.00 -2.17     2.88   0.08
## Developmental_Math_Grade*       1.00    3.00    2.00  0.86    -0.69   0.17
## Dev_Math_Term*                  1.00    8.00    7.00  0.30    -0.86   0.48
## Developmental_Math_Pass         1.00    1.00    0.00   NaN      NaN   0.00
## DevMathGradeNumber              2.00    4.00    2.00 -0.86    -0.69   0.17
## CourseName.y.y*                 1.00    1.00    0.00   NaN      NaN   0.00
## College_Math_Grade*             1.00    5.00    4.00  0.55    -0.46   0.09
## Col_Math_Term*                  1.00    1.00    0.00   NaN      NaN   0.00
## College_Math_Pass               0.00    1.00    1.00 -2.05     2.22   0.03
## ColMathGradeNumber              0.00    4.00    4.00 -0.55    -0.46   0.09
## ALEKS                            Inf    -Inf    -Inf    NA       NA     NA
## ACT_Math                       15.00   31.00   16.00 -0.50     0.32   0.36
## ACT_Reading                    14.00   34.00   20.00  0.15    -0.30   0.51
## ACT_Engl                       15.00   34.00   19.00  0.62     0.85   0.41
## McCann_R                         Inf    -Inf    -Inf    NA       NA     NA
## McCann_W                         Inf    -Inf    -Inf    NA       NA     NA
## AnonId                          8.00 9210.00 9202.00  0.11    -0.67 177.64
## EnglishStart                    0.00    1.00    1.00  0.28    -1.94   0.05
## MathStart                       0.00    1.00    1.00  0.66    -1.58   0.04
## gpahave                         0.00    1.00    1.00 -1.99     1.96   0.03
## ------------------------------------------------------------ 
## group: 15/FA
##                              vars   n    mean      sd  median trimmed     mad
## LCCCGPA                         1 214    2.80    0.75    2.90    2.87    0.79
## HSGPA                           2 179    3.04    0.56    3.07    3.06    0.57
## HighSchoolEndYear               3 214 2010.60    5.54 2013.00 2011.54    2.97
## HSDate*                         4 214   12.80    4.75   14.00   13.14    2.97
## StartTerm*                      5 214   25.56    7.92   28.00   26.96    4.45
## StartDate*                      6 214   21.88    7.36   26.00   22.88    2.97
## HSGradYears*                    7 214   18.49   11.17   14.00   17.52    2.97
## CourseName.x*                   8   6    1.83    0.41    2.00    1.83    0.00
## Developmental_English_Grade*    9   6    1.00    0.00    1.00    1.00    0.00
## Location*                      10   6    1.83    0.41    2.00    1.83    0.00
## Dev_Eng_Term*                  11   6    1.00    0.00    1.00    1.00    0.00
## Developmental_English_Pass     12   6    1.00    0.00    1.00    1.00    0.00
## DevEnglGradeNumber             13   6    1.00    0.00    1.00    1.00    0.00
## CourseName.y*                  14 119    1.00    0.00    1.00    1.00    0.00
## College_English_Grade*         15 119    1.99    1.06    2.00    1.85    1.48
## Col_Eng_Term*                  16 119    7.89    2.35    9.00    8.15    1.48
## College_English_Pass           17 119    0.93    0.25    1.00    1.00    0.00
## ColEnglGradeNumber             18 119    3.01    1.06    3.00    3.15    1.48
## CourseName.x.x*                19  16    1.00    0.00    1.00    1.00    0.00
## Developmental_Math_Grade*      20  16    2.19    0.98    2.00    2.14    1.48
## Dev_Math_Term*                 21  16    5.88    2.68    7.00    6.00    2.22
## Developmental_Math_Pass        22  16    0.94    0.25    1.00    1.00    0.00
## DevMathGradeNumber             23  16    2.75    1.13    3.00    2.86    1.48
## CourseName.y.y*                24 214    1.03    0.18    1.00    1.00    0.00
## College_Math_Grade*            25 214    2.39    1.26    2.00    2.24    1.48
## Col_Math_Term*                 26 214    1.00    0.00    1.00    1.00    0.00
## College_Math_Pass              27 214    0.83    0.37    1.00    0.91    0.00
## ColMathGradeNumber             28 214    2.61    1.26    3.00    2.76    1.48
## ALEKS                          29   1   40.00      NA   40.00   40.00    0.00
## ACT_Math                       30  82   21.27    3.58   22.00   21.35    2.97
## ACT_Reading                    31  82   22.17    4.48   21.00   21.86    4.45
## ACT_Engl                       32  83   20.67    4.68   20.00   20.60    4.45
## McCann_R                       33   3  110.33    4.16  109.00  110.33    2.97
## McCann_W                       34   1    6.00      NA    6.00    6.00    0.00
## AnonId                         35 214 4586.47 2325.62 4681.00 4546.44 2301.00
## EnglishStart                   36 119    0.37    0.48    0.00    0.34    0.00
## MathStart                      37 214    0.29    0.45    0.00    0.23    0.00
## gpahave                        38 214    0.84    0.37    1.00    0.92    0.00
##                                  min  max   range  skew kurtosis     se
## LCCCGPA                         0.20    4    3.80 -0.80     0.55   0.05
## HSGPA                           1.44    4    2.56 -0.35    -0.38   0.04
## HighSchoolEndYear            1986.00 2019   33.00 -1.66     2.97   0.38
## HSDate*                         1.00   26   25.00 -0.47     0.61   0.32
## StartTerm*                      1.00   37   36.00 -1.44     1.22   0.54
## StartDate*                      1.00   30   29.00 -0.91    -0.53   0.50
## HSGradYears*                    1.00   47   46.00  0.90     0.12   0.76
## CourseName.x*                   1.00    2    1.00 -1.36    -0.08   0.17
## Developmental_English_Grade*    1.00    1    0.00   NaN      NaN   0.00
## Location*                       1.00    2    1.00 -1.36    -0.08   0.17
## Dev_Eng_Term*                   1.00    1    0.00   NaN      NaN   0.00
## Developmental_English_Pass      1.00    1    0.00   NaN      NaN   0.00
## DevEnglGradeNumber              1.00    1    0.00   NaN      NaN   0.00
## CourseName.y*                   1.00    1    0.00   NaN      NaN   0.00
## College_English_Grade*          1.00    5    4.00  1.11     0.93   0.10
## Col_Eng_Term*                   1.00   12   11.00 -1.00     0.39   0.22
## College_English_Pass            0.00    1    1.00 -3.41     9.73   0.02
## ColEnglGradeNumber              0.00    4    4.00 -1.11     0.93   0.10
## CourseName.x.x*                 1.00    1    0.00   NaN      NaN   0.00
## Developmental_Math_Grade*       1.00    4    3.00  0.05    -1.42   0.25
## Dev_Math_Term*                  1.00    9    8.00 -0.52    -1.34   0.67
## Developmental_Math_Pass         0.00    1    1.00 -3.28     9.36   0.06
## DevMathGradeNumber              0.00    4    4.00 -0.59    -0.22   0.28
## CourseName.y.y*                 1.00    2    1.00  5.22    25.34   0.01
## College_Math_Grade*             1.00    5    4.00  0.76    -0.36   0.09
## Col_Math_Term*                  1.00    1    0.00   NaN      NaN   0.00
## College_Math_Pass               0.00    1    1.00 -1.76     1.11   0.03
## ColMathGradeNumber              0.00    4    4.00 -0.76    -0.36   0.09
## ALEKS                          40.00   40    0.00    NA       NA     NA
## ACT_Math                       13.00   28   15.00 -0.29    -0.88   0.40
## ACT_Reading                    14.00   33   19.00  0.56    -0.40   0.49
## ACT_Engl                       11.00   32   21.00  0.11    -0.15   0.51
## McCann_R                      107.00  115    8.00  0.29    -2.33   2.40
## McCann_W                        6.00    6    0.00    NA       NA     NA
## AnonId                         87.00 9262 9175.00  0.02    -0.54 158.98
## EnglishStart                    0.00    1    1.00  0.53    -1.73   0.04
## MathStart                       0.00    1    1.00  0.95    -1.11   0.03
## gpahave                         0.00    1    1.00 -1.81     1.27   0.03
## ------------------------------------------------------------ 
## group: 16/FA
##                              vars   n    mean      sd  median trimmed     mad
## LCCCGPA                         1 193    2.81    0.96    3.00    2.95    0.81
## HSGPA                           2 168    3.31    0.44    3.39    3.35    0.42
## HighSchoolEndYear               3 193 2013.08    5.81 2016.00 2014.44    0.00
## HSDate*                         4 193   14.14    3.68   16.00   14.75    0.00
## StartTerm*                      5 193   15.46    3.76   17.00   16.03    0.00
## StartDate*                      6 193   16.42    4.69   19.00   17.38    0.00
## HSGradYears*                    7 193   12.07    7.06    9.00   10.82    0.00
## CourseName.x*                   8   4    1.00    0.00    1.00    1.00    0.00
## Developmental_English_Grade*    9   4    1.75    0.50    2.00    1.75    0.00
## Location*                      10   4    1.50    0.58    1.50    1.50    0.74
## Dev_Eng_Term*                  11   4    1.25    0.50    1.00    1.25    0.00
## Developmental_English_Pass     12   4    0.25    0.50    0.00    0.25    0.00
## DevEnglGradeNumber             13   4    0.25    0.50    0.00    0.25    0.00
## CourseName.y*                  14 103    1.00    0.00    1.00    1.00    0.00
## College_English_Grade*         15 103    2.10    1.29    2.00    1.88    1.48
## Col_Eng_Term*                  16 103    6.94    1.80    7.00    6.94    0.00
## College_English_Pass           17 103    0.87    0.33    1.00    0.96    0.00
## ColEnglGradeNumber             18 103    2.90    1.29    3.00    3.12    1.48
## CourseName.x.x*                19  14    2.50    0.94    3.00    2.50    0.00
## Developmental_Math_Grade*      20  14    2.36    0.93    2.50    2.33    0.74
## Dev_Math_Term*                 21  14    5.93    3.22    6.00    5.92    4.45
## Developmental_Math_Pass        22  14    0.93    0.27    1.00    1.00    0.00
## DevMathGradeNumber             23  14    2.57    1.09    2.50    2.67    0.74
## CourseName.y.y*                24 193    1.06    0.24    1.00    1.00    0.00
## College_Math_Grade*            25 193    2.37    1.34    2.00    2.22    1.48
## Col_Math_Term*                 26 193    1.00    0.00    1.00    1.00    0.00
## College_Math_Pass              27 193    0.83    0.38    1.00    0.91    0.00
## ColMathGradeNumber             28 193    2.63    1.34    3.00    2.78    1.48
## ALEKS                          29  31   53.58   17.81   54.00   54.00   19.27
## ACT_Math                       30 121   20.52    3.21   21.00   20.45    4.45
## ACT_Reading                    31 123   21.61    4.07   21.00   21.45    2.97
## ACT_Engl                       32 123   20.44    3.96   20.00   20.27    2.97
## McCann_R                       33  16  101.88    9.69  101.00  102.50    3.71
## McCann_W                       34  14    5.21    0.70    5.00    5.25    0.74
## AnonId                         35 193 5388.44 2122.48 5703.00 5459.33 2054.88
## EnglishStart                   36 103    0.61    0.49    1.00    0.64    0.00
## MathStart                      37 193    0.59    0.49    1.00    0.61    0.00
## gpahave                        38 193    0.87    0.34    1.00    0.96    0.00
##                                  min  max   range  skew kurtosis     se
## LCCCGPA                         0.00    4    4.00 -1.28     1.25   0.07
## HSGPA                           1.64    4    2.36 -1.03     1.53   0.03
## HighSchoolEndYear            1973.00 2018   45.00 -3.40    15.03   0.42
## HSDate*                         1.00   24   23.00 -1.41     2.66   0.27
## StartTerm*                      1.00   24   23.00 -1.59     2.94   0.27
## StartDate*                      1.00   22   21.00 -1.64     1.30   0.34
## HSGradYears*                    1.00   34   33.00  1.58     1.73   0.51
## CourseName.x*                   1.00    1    0.00   NaN      NaN   0.00
## Developmental_English_Grade*    1.00    2    1.00 -0.75    -1.69   0.25
## Location*                       1.00    2    1.00  0.00    -2.44   0.29
## Dev_Eng_Term*                   1.00    2    1.00  0.75    -1.69   0.25
## Developmental_English_Pass      0.00    1    1.00  0.75    -1.69   0.25
## DevEnglGradeNumber              0.00    1    1.00  0.75    -1.69   0.25
## CourseName.y*                   1.00    1    0.00   NaN      NaN   0.00
## College_English_Grade*          1.00    5    4.00  1.08     0.13   0.13
## Col_Eng_Term*                   1.00   13   12.00 -0.05     2.58   0.18
## College_English_Pass            0.00    1    1.00 -2.22     2.95   0.03
## ColEnglGradeNumber              0.00    4    4.00 -1.08     0.13   0.13
## CourseName.x.x*                 1.00    4    3.00 -0.52    -1.09   0.25
## Developmental_Math_Grade*       1.00    4    3.00 -0.15    -1.22   0.25
## Dev_Math_Term*                  1.00   11   10.00 -0.02    -1.48   0.86
## Developmental_Math_Pass         0.00    1    1.00 -2.98     7.41   0.07
## DevMathGradeNumber              0.00    4    4.00 -0.50    -0.11   0.29
## CourseName.y.y*                 1.00    2    1.00  3.60    11.00   0.02
## College_Math_Grade*             1.00    5    4.00  0.80    -0.47   0.10
## Col_Math_Term*                  1.00    1    0.00   NaN      NaN   0.00
## College_Math_Pass               0.00    1    1.00 -1.73     1.01   0.03
## ColMathGradeNumber              0.00    4    4.00 -0.80    -0.47   0.10
## ALEKS                          19.00   81   62.00 -0.14    -1.07   3.20
## ACT_Math                       15.00   30   15.00  0.19    -0.75   0.29
## ACT_Reading                    13.00   33   20.00  0.39    -0.02   0.37
## ACT_Engl                       10.00   35   25.00  0.52     1.20   0.36
## McCann_R                       75.00  120   45.00 -0.70     1.80   2.42
## McCann_W                        4.00    6    2.00 -0.26    -1.13   0.19
## AnonId                         72.00 9306 9234.00 -0.31    -0.35 152.78
## EnglishStart                    0.00    1    1.00 -0.45    -1.81   0.05
## MathStart                       0.00    1    1.00 -0.34    -1.89   0.04
## gpahave                         0.00    1    1.00 -2.19     2.81   0.02
## ------------------------------------------------------------ 
## group: 17/FA
##                              vars   n    mean      sd  median trimmed     mad
## LCCCGPA                         1 191    2.80    0.94    3.00    2.91    0.81
## HSGPA                           2 177    3.24    0.44    3.32    3.27    0.42
## HighSchoolEndYear               3 191 2014.78    5.07 2017.00 2015.94    1.48
## HSDate*                         4 191   13.46    3.16   15.00   14.10    1.48
## StartTerm*                      5 191   13.91    3.05   15.00   14.35    0.00
## StartDate*                      6 191   13.85    3.99   16.00   14.67    0.00
## HSGradYears*                    7 191   13.43    6.25   11.00   12.45    0.00
## CourseName.x*                   8   5    1.00    0.00    1.00    1.00    0.00
## Developmental_English_Grade*    9   5    1.00    0.00    1.00    1.00    0.00
## Location*                      10   5    1.00    0.00    1.00    1.00    0.00
## Dev_Eng_Term*                  11   5    2.60    1.14    3.00    2.60    1.48
## Developmental_English_Pass     12   5    1.00    0.00    1.00    1.00    0.00
## DevEnglGradeNumber             13   5    1.00    0.00    1.00    1.00    0.00
## CourseName.y*                  14 109    1.00    0.00    1.00    1.00    0.00
## College_English_Grade*         15 109    2.03    1.11    2.00    1.85    1.48
## Col_Eng_Term*                  16 109    5.92    1.42    6.00    6.02    0.00
## College_English_Pass           17 109    0.91    0.29    1.00    1.00    0.00
## ColEnglGradeNumber             18 109    2.97    1.11    3.00    3.15    1.48
## CourseName.x.x*                19   5    2.00    1.00    2.00    2.00    1.48
## Developmental_Math_Grade*      20   5    1.80    0.84    2.00    1.80    1.48
## Dev_Math_Term*                 21   5    2.40    1.14    2.00    2.40    1.48
## Developmental_Math_Pass        22   5    0.80    0.45    1.00    0.80    0.00
## DevMathGradeNumber             23   5    3.00    1.22    3.00    3.00    1.48
## CourseName.y.y*                24 191    1.00    0.00    1.00    1.00    0.00
## College_Math_Grade*            25 191    2.31    1.30    2.00    2.14    1.48
## Col_Math_Term*                 26 191    1.00    0.00    1.00    1.00    0.00
## College_Math_Pass              27 191    0.84    0.37    1.00    0.92    0.00
## ColMathGradeNumber             28 191    2.69    1.30    3.00    2.86    1.48
## ALEKS                          29  28   52.82   14.98   50.00   51.71   11.12
## ACT_Math                       30 135   21.17    3.16   21.00   21.11    4.45
## ACT_Reading                    31 135   22.34    4.68   22.00   22.19    4.45
## ACT_Engl                       32 134   20.75    3.61   21.00   20.98    2.97
## McCann_R                       33  22  100.64   10.38   99.50  100.72   11.86
## McCann_W                       34  21    4.57    0.75    5.00    4.53    1.48
## AnonId                         35 191 6255.17 2123.55 6787.00 6452.42 2127.53
## EnglishStart                   36 109    0.64    0.48    1.00    0.67    0.00
## MathStart                      37 191    0.60    0.49    1.00    0.62    0.00
## gpahave                        38 191    0.93    0.26    1.00    1.00    0.00
##                                 min     max   range  skew kurtosis     se
## LCCCGPA                         0.0    4.00    4.00 -1.03     0.51   0.07
## HSGPA                           1.7    4.02    2.32 -0.68     0.59   0.03
## HighSchoolEndYear            1973.0 2018.00   45.00 -4.35    26.13   0.37
## HSDate*                         1.0   20.00   19.00 -2.09     4.52   0.23
## StartTerm*                      1.0   22.00   21.00 -1.64     3.93   0.22
## StartDate*                      1.0   19.00   18.00 -1.63     1.16   0.29
## HSGradYears*                    1.0   35.00   34.00  1.53     2.38   0.45
## CourseName.x*                   1.0    1.00    0.00   NaN      NaN   0.00
## Developmental_English_Grade*    1.0    1.00    0.00   NaN      NaN   0.00
## Location*                       1.0    1.00    0.00   NaN      NaN   0.00
## Dev_Eng_Term*                   1.0    4.00    3.00 -0.19    -1.75   0.51
## Developmental_English_Pass      1.0    1.00    0.00   NaN      NaN   0.00
## DevEnglGradeNumber              1.0    1.00    0.00   NaN      NaN   0.00
## CourseName.y*                   1.0    1.00    0.00   NaN      NaN   0.00
## College_English_Grade*          1.0    5.00    4.00  1.08     0.60   0.11
## Col_Eng_Term*                   1.0    9.00    8.00 -0.91     1.82   0.14
## College_English_Pass            0.0    1.00    1.00 -2.79     5.84   0.03
## ColEnglGradeNumber              0.0    4.00    4.00 -1.08     0.60   0.11
## CourseName.x.x*                 1.0    3.00    2.00  0.00    -2.20   0.45
## Developmental_Math_Grade*       1.0    3.00    2.00  0.25    -1.82   0.37
## Dev_Math_Term*                  1.0    4.00    3.00  0.19    -1.75   0.51
## Developmental_Math_Pass         0.0    1.00    1.00 -1.07    -0.92   0.20
## DevMathGradeNumber              1.0    4.00    3.00 -0.65    -1.40   0.55
## CourseName.y.y*                 1.0    1.00    0.00   NaN      NaN   0.00
## College_Math_Grade*             1.0    5.00    4.00  0.85    -0.30   0.09
## Col_Math_Term*                  1.0    1.00    0.00   NaN      NaN   0.00
## College_Math_Pass               0.0    1.00    1.00 -1.82     1.31   0.03
## ColMathGradeNumber              0.0    4.00    4.00 -0.85    -0.30   0.09
## ALEKS                          28.0   94.00   66.00  0.92     0.55   2.83
## ACT_Math                       15.0   29.00   14.00  0.09    -0.87   0.27
## ACT_Reading                    12.0   36.00   24.00  0.27    -0.01   0.40
## ACT_Engl                        9.0   28.00   19.00 -0.62     0.30   0.31
## McCann_R                       82.0  118.00   36.00 -0.06    -1.15   2.21
## McCann_W                        3.0    6.00    3.00  0.11    -0.59   0.16
## AnonId                        250.0 9336.00 9086.00 -0.76    -0.23 153.65
## EnglishStart                    0.0    1.00    1.00 -0.59    -1.67   0.05
## MathStart                       0.0    1.00    1.00 -0.39    -1.86   0.04
## gpahave                         0.0    1.00    1.00 -3.25     8.60   0.02
## ------------------------------------------------------------ 
## group: 18/FA
##                              vars   n    mean      sd  median trimmed     mad
## LCCCGPA                         1 148    2.78    0.91    2.98    2.88    0.79
## HSGPA                           2 140    3.26    0.43    3.29    3.28    0.39
## HighSchoolEndYear               3 148 2016.42    3.69 2018.00 2017.29    0.00
## HSDate*                         4 148   11.87    2.45   13.00   12.37    0.00
## StartTerm*                      5 148   11.34    2.35   12.00   11.72    0.00
## StartDate*                      6 148   12.25    3.45   14.00   12.98    0.00
## HSGradYears*                    7 148    9.58    4.69    8.00    8.91    0.00
## CourseName.x*                   8   3    1.67    0.58    2.00    1.67    0.00
## Developmental_English_Grade*    9   3    1.00    0.00    1.00    1.00    0.00
## Location*                      10   3    1.00    0.00    1.00    1.00    0.00
## Dev_Eng_Term*                  11   3    1.00    0.00    1.00    1.00    0.00
## Developmental_English_Pass     12   3    1.00    0.00    1.00    1.00    0.00
## DevEnglGradeNumber             13   3    1.00    0.00    1.00    1.00    0.00
## CourseName.y*                  14  82    1.00    0.00    1.00    1.00    0.00
## College_English_Grade*         15  82    2.18    1.36    2.00    1.98    1.48
## Col_Eng_Term*                  16  82    6.33    1.32    6.00    6.42    0.00
## College_English_Pass           17  82    0.84    0.37    1.00    0.92    0.00
## ColEnglGradeNumber             18  82    2.82    1.36    3.00    3.02    1.48
## CourseName.x.x*                19   2    1.50    0.71    1.50    1.50    0.74
## Developmental_Math_Grade*      20   2    1.50    0.71    1.50    1.50    0.74
## Dev_Math_Term*                 21   2    1.00    0.00    1.00    1.00    0.00
## Developmental_Math_Pass        22   2    0.50    0.71    0.50    0.50    0.74
## DevMathGradeNumber             23   2    1.50    2.12    1.50    1.50    2.22
## CourseName.y.y*                24 148    1.00    0.00    1.00    1.00    0.00
## College_Math_Grade*            25 148    2.36    1.28    2.00    2.21    1.48
## Col_Math_Term*                 26 148    1.00    0.00    1.00    1.00    0.00
## College_Math_Pass              27 148    0.81    0.39    1.00    0.88    0.00
## ColMathGradeNumber             28 148    2.64    1.28    3.00    2.79    1.48
## ALEKS                          29  13   49.00   11.37   47.00   49.27   13.34
## ACT_Math                       30  95   20.64    3.83   21.00   20.55    5.93
## ACT_Reading                    31  94   21.98    5.08   22.00   21.71    4.45
## ACT_Engl                       32  95   20.67    4.99   21.00   20.73    2.97
## McCann_R                       33  18  109.00   16.40  108.00  108.56   10.38
## McCann_W                       34  17    5.00    0.87    5.00    5.07    1.48
## AnonId                         35 148 6692.77 2178.67 7355.00 7041.37 1337.31
## EnglishStart                   36  82    0.60    0.49    1.00    0.62    0.00
## MathStart                      37 148    0.68    0.47    1.00    0.72    0.00
## gpahave                        38 148    0.95    0.23    1.00    1.00    0.00
##                                  min  max   range  skew kurtosis     se
## LCCCGPA                         0.00    4    4.00 -1.03     0.71   0.08
## HSGPA                           1.66    4    2.34 -0.87     1.49   0.04
## HighSchoolEndYear            1996.00 2020   24.00 -3.35    12.34   0.30
## HSDate*                         1.00   17   16.00 -2.16     5.24   0.20
## StartTerm*                      1.00   17   16.00 -2.00     5.12   0.19
## StartDate*                      1.00   16   15.00 -1.77     1.66   0.28
## HSGradYears*                    1.00   25   24.00  1.55     2.26   0.39
## CourseName.x*                   1.00    2    1.00 -0.38    -2.33   0.33
## Developmental_English_Grade*    1.00    1    0.00   NaN      NaN   0.00
## Location*                       1.00    1    0.00   NaN      NaN   0.00
## Dev_Eng_Term*                   1.00    1    0.00   NaN      NaN   0.00
## Developmental_English_Pass      1.00    1    0.00   NaN      NaN   0.00
## DevEnglGradeNumber              1.00    1    0.00   NaN      NaN   0.00
## CourseName.y*                   1.00    1    0.00   NaN      NaN   0.00
## College_English_Grade*          1.00    5    4.00  1.00    -0.21   0.15
## Col_Eng_Term*                   1.00    9    8.00 -0.96     3.08   0.15
## College_English_Pass            0.00    1    1.00 -1.84     1.39   0.04
## ColEnglGradeNumber              0.00    4    4.00 -1.00    -0.21   0.15
## CourseName.x.x*                 1.00    2    1.00  0.00    -2.75   0.50
## Developmental_Math_Grade*       1.00    2    1.00  0.00    -2.75   0.50
## Dev_Math_Term*                  1.00    1    0.00   NaN      NaN   0.00
## Developmental_Math_Pass         0.00    1    1.00  0.00    -2.75   0.50
## DevMathGradeNumber              0.00    3    3.00  0.00    -2.75   1.50
## CourseName.y.y*                 1.00    1    0.00   NaN      NaN   0.00
## College_Math_Grade*             1.00    5    4.00  0.66    -0.62   0.11
## Col_Math_Term*                  1.00    1    0.00   NaN      NaN   0.00
## College_Math_Pass               0.00    1    1.00 -1.57     0.47   0.03
## ColMathGradeNumber              0.00    4    4.00 -0.66    -0.62   0.11
## ALEKS                          27.00   68   41.00 -0.25    -0.89   3.15
## ACT_Math                       14.00   28   14.00  0.11    -1.27   0.39
## ACT_Reading                    12.00   35   23.00  0.44    -0.02   0.52
## ACT_Engl                        2.00   32   30.00 -0.37     1.53   0.51
## McCann_R                       75.00  150   75.00  0.46     0.56   3.86
## McCann_W                        3.00    6    3.00 -0.54    -0.49   0.21
## AnonId                        143.00 9362 9219.00 -1.45     1.52 179.09
## EnglishStart                    0.00    1    1.00 -0.39    -1.87   0.05
## MathStart                       0.00    1    1.00 -0.78    -1.41   0.04
## gpahave                         0.00    1    1.00 -3.90    13.33   0.02
## ------------------------------------------------------------ 
## group: 19/FA
##                              vars   n    mean      sd  median trimmed     mad
## LCCCGPA                         1 161    2.84    0.93    3.06    2.96    0.86
## HSGPA                           2 157    3.30    0.42    3.33    3.32    0.35
## HighSchoolEndYear               3 161 2016.48    5.68 2019.00 2017.95    0.00
## HSDate*                         4 161   17.43    3.87   19.00   18.26    0.00
## StartTerm*                      5 161   16.86    3.40   18.00   17.62    0.00
## StartDate*                      6 161   15.28    4.03   17.00   16.31    0.00
## HSGradYears*                    7 161    7.00    4.94    5.00    5.83    0.00
## CourseName.x*                   8   0     NaN      NA      NA     NaN      NA
## Developmental_English_Grade*    9   0     NaN      NA      NA     NaN      NA
## Location*                      10   0     NaN      NA      NA     NaN      NA
## Dev_Eng_Term*                  11   0     NaN      NA      NA     NaN      NA
## Developmental_English_Pass     12   0     NaN      NA      NA     NaN      NA
## DevEnglGradeNumber             13   0     NaN      NA      NA     NaN      NA
## CourseName.y*                  14 111    1.00    0.00    1.00    1.00    0.00
## College_English_Grade*         15 111    1.99    1.07    2.00    1.83    1.48
## Col_Eng_Term*                  16 111    6.26    1.47    6.00    6.24    0.00
## College_English_Pass           17 111    0.93    0.26    1.00    1.00    0.00
## ColEnglGradeNumber             18 111    3.01    1.07    3.00    3.17    1.48
## CourseName.x.x*                19   5    1.00    0.00    1.00    1.00    0.00
## Developmental_Math_Grade*      20   5    3.00    1.58    3.00    3.00    1.48
## Dev_Math_Term*                 21   5    3.00    1.58    3.00    3.00    1.48
## Developmental_Math_Pass        22   5    0.60    0.55    1.00    0.60    0.00
## DevMathGradeNumber             23   5    2.00    1.58    2.00    2.00    1.48
## CourseName.y.y*                24 161    1.00    0.00    1.00    1.00    0.00
## College_Math_Grade*            25 161    2.55    1.36    2.00    2.43    1.48
## Col_Math_Term*                 26 161    1.00    0.00    1.00    1.00    0.00
## College_Math_Pass              27 161    0.77    0.42    1.00    0.84    0.00
## ColMathGradeNumber             28 161    2.45    1.36    3.00    2.57    1.48
## ALEKS                          29  16   37.31   15.45   34.00   37.21   15.57
## ACT_Math                       30 101   20.39    3.84   20.00   20.21    4.45
## ACT_Reading                    31 101   22.41    4.95   22.00   21.99    4.45
## ACT_Engl                       32 101   20.46    4.14   21.00   20.35    2.97
## McCann_R                       33  15  103.33   14.79  103.00  103.69   11.86
## McCann_W                       34  12    5.08    0.79    5.00    5.10    1.48
## AnonId                         35 161 6766.45 2200.91 7374.00 7139.67 1595.28
## EnglishStart                   36 111    0.68    0.47    1.00    0.72    0.00
## MathStart                      37 161    0.73    0.44    1.00    0.79    0.00
## gpahave                        38 161    0.98    0.16    1.00    1.00    0.00
##                                  min     max   range  skew kurtosis     se
## LCCCGPA                         0.00    4.00    4.00 -1.08     0.80   0.07
## HSGPA                           1.64    4.01    2.37 -0.92     2.07   0.03
## HighSchoolEndYear            1983.00 2021.00   38.00 -3.07    10.52   0.45
## HSDate*                         1.00   25.00   24.00 -2.24     5.40   0.30
## StartTerm*                      1.00   23.00   22.00 -2.75     8.11   0.27
## StartDate*                      1.00   20.00   19.00 -2.09     2.99   0.32
## HSGradYears*                    1.00   26.00   25.00  2.17     3.88   0.39
## CourseName.x*                    Inf    -Inf    -Inf    NA       NA     NA
## Developmental_English_Grade*     Inf    -Inf    -Inf    NA       NA     NA
## Location*                        Inf    -Inf    -Inf    NA       NA     NA
## Dev_Eng_Term*                    Inf    -Inf    -Inf    NA       NA     NA
## Developmental_English_Pass       Inf    -Inf    -Inf    NA       NA     NA
## DevEnglGradeNumber               Inf    -Inf    -Inf    NA       NA     NA
## CourseName.y*                   1.00    1.00    0.00   NaN      NaN   0.00
## College_English_Grade*          1.00    5.00    4.00  1.18     1.09   0.10
## Col_Eng_Term*                   1.00   10.00    9.00  0.16     2.00   0.14
## College_English_Pass            0.00    1.00    1.00 -3.26     8.74   0.02
## ColEnglGradeNumber              0.00    4.00    4.00 -1.18     1.09   0.10
## CourseName.x.x*                 1.00    1.00    0.00   NaN      NaN   0.00
## Developmental_Math_Grade*       1.00    5.00    4.00  0.00    -1.91   0.71
## Dev_Math_Term*                  1.00    5.00    4.00  0.00    -1.91   0.71
## Developmental_Math_Pass         0.00    1.00    1.00 -0.29    -2.25   0.24
## DevMathGradeNumber              0.00    4.00    4.00  0.00    -1.91   0.71
## CourseName.y.y*                 1.00    1.00    0.00   NaN      NaN   0.00
## College_Math_Grade*             1.00    5.00    4.00  0.60    -0.84   0.11
## Col_Math_Term*                  1.00    1.00    0.00   NaN      NaN   0.00
## College_Math_Pass               0.00    1.00    1.00 -1.27    -0.38   0.03
## ColMathGradeNumber              0.00    4.00    4.00 -0.60    -0.84   0.11
## ALEKS                           9.00   67.00   58.00  0.13    -0.86   3.86
## ACT_Math                       13.00   29.00   16.00  0.28    -1.02   0.38
## ACT_Reading                    13.00   35.00   22.00  0.71     0.06   0.49
## ACT_Engl                        9.00   34.00   25.00  0.41     1.29   0.41
## McCann_R                       72.00  130.00   58.00 -0.12    -0.31   3.82
## McCann_W                        4.00    6.00    2.00 -0.12    -1.53   0.23
## AnonId                         75.00 9392.00 9317.00 -1.48     1.71 173.46
## EnglishStart                    0.00    1.00    1.00 -0.74    -1.46   0.04
## MathStart                       0.00    1.00    1.00 -1.04    -0.92   0.03
## gpahave                         0.00    1.00    1.00 -6.05    34.80   0.01
## ------------------------------------------------------------ 
## group: 20/FA
##                              vars   n    mean      sd  median trimmed     mad
## LCCCGPA                         1 274    2.61    1.05    2.75    2.71    1.05
## HSGPA                           2 254    3.01    0.61    3.02    3.02    0.71
## HighSchoolEndYear               3 274 2015.97    6.75 2019.00 2017.48    1.48
## HSDate*                         4 274   17.41    4.98   19.00   18.06    1.48
## StartTerm*                      5 274   24.13    5.88   27.00   25.35    0.00
## StartDate*                      6 274   23.34    6.62   27.00   24.74    0.00
## HSGradYears*                    7 274   13.99   12.72    7.00   11.28    0.00
## CourseName.x*                   8  40    1.75    0.44    2.00    1.81    0.00
## Developmental_English_Grade*    9  40    1.15    0.36    1.00    1.06    0.00
## Location*                      10  40    1.93    0.27    2.00    2.00    0.00
## Dev_Eng_Term*                  11  40    4.62    1.25    5.00    4.69    1.48
## Developmental_English_Pass     12  40    0.85    0.36    1.00    0.94    0.00
## DevEnglGradeNumber             13  40    0.85    0.36    1.00    0.94    0.00
## CourseName.y*                  14 176    1.00    0.00    1.00    1.00    0.00
## College_English_Grade*         15 176    2.22    1.33    2.00    2.04    1.48
## Col_Eng_Term*                  16 176   10.59    2.38   11.00   10.85    1.48
## College_English_Pass           17 176    0.84    0.37    1.00    0.92    0.00
## ColEnglGradeNumber             18 176    2.78    1.33    3.00    2.96    1.48
## CourseName.x.x*                19  49    2.12    0.39    2.00    2.07    0.00
## Developmental_Math_Grade*      20  49    2.61    1.37    2.00    2.49    1.48
## Dev_Math_Term*                 21  49    7.61    2.07    9.00    7.95    0.00
## Developmental_Math_Pass        22  49    0.80    0.41    1.00    0.85    0.00
## DevMathGradeNumber             23  49    2.43    1.27    3.00    2.51    1.48
## CourseName.y.y*                24 274    1.00    0.00    1.00    1.00    0.00
## College_Math_Grade*            25 274    2.55    1.47    2.00    2.45    1.48
## Col_Math_Term*                 26 274    1.00    0.00    1.00    1.00    0.00
## College_Math_Pass              27 274    0.76    0.43    1.00    0.82    0.00
## ColMathGradeNumber             28 274    2.45    1.47    3.00    2.55    1.48
## ALEKS                          29  57   19.44   13.74   15.00   17.51   10.38
## ACT_Math                       30 141   18.79    3.74   18.00   18.44    2.97
## ACT_Reading                    31 140   20.26    4.65   20.00   20.04    4.45
## ACT_Engl                       32 141   18.58    4.59   19.00   18.42    4.45
## McCann_R                       33  48   97.85   15.87   99.00   97.17   10.38
## McCann_W                       34  25    4.76    0.72    5.00    4.76    0.00
## AnonId                         35 274 6778.21 2106.77 7382.50 7103.92 1716.85
## EnglishStart                   36 176    0.62    0.49    1.00    0.65    0.00
## MathStart                      37 274    0.51    0.50    1.00    0.51    0.00
## gpahave                        38 274    0.93    0.26    1.00    1.00    0.00
##                                  min    max   range  skew kurtosis     se
## LCCCGPA                         0.00    4.0    4.00 -0.74    -0.15   0.06
## HSGPA                           1.28    4.2    2.92 -0.24    -0.72   0.04
## HighSchoolEndYear            1985.00 2022.0   37.00 -2.29     5.43   0.41
## HSDate*                         1.00   31.0   30.00 -1.06     1.81   0.30
## StartTerm*                      1.00   34.0   33.00 -1.96     3.37   0.35
## StartDate*                      1.00   31.0   30.00 -1.70     1.52   0.40
## HSGradYears*                    1.00   52.0   51.00  1.62     1.30   0.77
## CourseName.x*                   1.00    2.0    1.00 -1.11    -0.78   0.07
## Developmental_English_Grade*    1.00    2.0    1.00  1.89     1.60   0.06
## Location*                       1.00    2.0    1.00 -3.11     7.85   0.04
## Dev_Eng_Term*                   1.00    7.0    6.00 -0.50     0.90   0.20
## Developmental_English_Pass      0.00    1.0    1.00 -1.89     1.60   0.06
## DevEnglGradeNumber              0.00    1.0    1.00 -1.89     1.60   0.06
## CourseName.y*                   1.00    1.0    0.00   NaN      NaN   0.00
## College_English_Grade*          1.00    5.0    4.00  0.98    -0.19   0.10
## Col_Eng_Term*                   1.00   14.0   13.00 -1.65     4.00   0.18
## College_English_Pass            0.00    1.0    1.00 -1.79     1.22   0.03
## ColEnglGradeNumber              0.00    4.0    4.00 -0.98    -0.19   0.10
## CourseName.x.x*                 1.00    3.0    2.00  1.12     2.12   0.06
## Developmental_Math_Grade*       1.00    6.0    5.00  0.90    -0.07   0.20
## Dev_Math_Term*                  1.00   10.0    9.00 -1.41     1.30   0.30
## Developmental_Math_Pass         0.00    1.0    1.00 -1.42     0.03   0.06
## DevMathGradeNumber              0.00    4.0    4.00 -0.70    -0.58   0.18
## CourseName.y.y*                 1.00    1.0    0.00   NaN      NaN   0.00
## College_Math_Grade*             1.00    5.0    4.00  0.54    -1.07   0.09
## Col_Math_Term*                  1.00    1.0    0.00   NaN      NaN   0.00
## College_Math_Pass               0.00    1.0    1.00 -1.21    -0.55   0.03
## ColMathGradeNumber              0.00    4.0    4.00 -0.54    -1.07   0.09
## ALEKS                           4.00   71.0   67.00  1.57     2.75   1.82
## ACT_Math                       11.00   32.0   21.00  0.91     0.88   0.31
## ACT_Reading                     8.00   35.0   27.00  0.45     0.26   0.39
## ACT_Engl                        7.00   35.0   28.00  0.46     0.54   0.39
## McCann_R                       66.00  150.0   84.00  0.57     1.27   2.29
## McCann_W                        3.00    6.0    3.00 -0.28    -0.21   0.14
## AnonId                         51.00 9408.0 9357.00 -1.34     1.39 127.27
## EnglishStart                    0.00    1.0    1.00 -0.49    -1.77   0.04
## MathStart                       0.00    1.0    1.00 -0.04    -2.01   0.03
## gpahave                         0.00    1.0    1.00 -3.27     8.69   0.02
model1<- lm(LCCCGPA ~ HSGPA + ACT_Math + ACT_Engl + ACT_Reading + ALEKS + McCann_R + McCann_W, data = Placement)

summary(model1)
## 
## Call:
## lm(formula = LCCCGPA ~ HSGPA + ACT_Math + ACT_Engl + ACT_Reading + 
##     ALEKS + McCann_R + McCann_W, data = Placement)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.7853 -0.5343  0.1364  0.6315  1.8617 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -1.226514   0.499232  -2.457   0.0145 *  
## HSGPA        0.822516   0.124669   6.598 1.65e-10 ***
## ACT_Math     0.012848   0.025481   0.504   0.6145    
## ACT_Engl     0.027336   0.017365   1.574   0.1164    
## ACT_Reading -0.021486   0.017909  -1.200   0.2311    
## ALEKS       -0.005442   0.004591  -1.185   0.2368    
## McCann_R     0.013740   0.004432   3.100   0.0021 ** 
## McCann_W    -0.040519   0.059012  -0.687   0.4928    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9132 on 332 degrees of freedom
##   (9082 observations deleted due to missingness)
## Multiple R-squared:  0.1993, Adjusted R-squared:  0.1824 
## F-statistic: 11.81 on 7 and 332 DF,  p-value: 1.952e-13
VIF(model1)
##       HSGPA    ACT_Math    ACT_Engl ACT_Reading       ALEKS    McCann_R 
##    1.275524    1.645069    1.936999    1.772942    1.361161    1.443325 
##    McCann_W 
##    1.231992
mediationmodel <- with(Placement, 

"
LCCCGPA ~ a*HSGPA
ACT_Math ~ b*LCCCGPA
ACT_Math ~ c*HSGPA



Mediation      := a * b
Total := c + a*b

")

mediationmodel <- sem(mediationmodel, data = Placement)

summary(mediationmodel, fit.measures = TRUE, standardized = TRUE, rsquare = TRUE)
## lavaan 0.6-12 ended normally after 1 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                         5
## 
##                                                   Used       Total
##   Number of observations                          2917        9422
## 
## Model Test User Model:
##                                                       
##   Test statistic                                 0.000
##   Degrees of freedom                                 0
## 
## Model Test Baseline Model:
## 
##   Test statistic                              1237.383
##   Degrees of freedom                                 3
##   P-value                                        0.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    1.000
##   Tucker-Lewis Index (TLI)                       1.000
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)             -11646.695
##   Loglikelihood unrestricted model (H1)     -11646.695
##                                                       
##   Akaike (AIC)                               23303.391
##   Bayesian (BIC)                             23333.282
##   Sample-size adjusted Bayesian (BIC)        23317.395
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.000
##   90 Percent confidence interval - lower         0.000
##   90 Percent confidence interval - upper         0.000
##   P-value RMSEA <= 0.05                             NA
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.000
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   LCCCGPA ~                                                             
##     HSGPA      (a)    0.870    0.031   27.687    0.000    0.870    0.456
##   ACT_Math ~                                                            
##     LCCCGPA    (b)    0.138    0.067    2.049    0.040    0.138    0.039
##     HSGPA      (c)    2.697    0.128   21.031    0.000    2.697    0.398
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .LCCCGPA           0.874    0.023   38.190    0.000    0.874    0.792
##    .ACT_Math         11.518    0.302   38.190    0.000   11.518    0.826
## 
## R-Square:
##                    Estimate
##     LCCCGPA           0.208
##     ACT_Math          0.174
## 
## Defined Parameters:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##     Mediation         0.120    0.059    2.043    0.041    0.120    0.018
##     Total             2.817    0.114   24.666    0.000    2.817    0.415
stdsolution<-standardizedsolution(mediationmodel, type = "std.all")
stdsolution
##         lhs op      rhs     label est.std    se      z pvalue ci.lower ci.upper
## 1   LCCCGPA  ~    HSGPA         a   0.456 0.014 32.870  0.000    0.429    0.483
## 2  ACT_Math  ~  LCCCGPA         b   0.039 0.019  2.050  0.040    0.002    0.076
## 3  ACT_Math  ~    HSGPA         c   0.398 0.017 23.182  0.000    0.364    0.431
## 4   LCCCGPA ~~  LCCCGPA             0.792 0.013 62.540  0.000    0.767    0.817
## 5  ACT_Math ~~ ACT_Math             0.826 0.012 67.751  0.000    0.802    0.850
## 6     HSGPA ~~    HSGPA             1.000 0.000     NA     NA    1.000    1.000
## 7 Mediation :=      a*b Mediation   0.018 0.009  2.045  0.041    0.001    0.035
## 8     Total :=    c+a*b     Total   0.415 0.015 28.368  0.000    0.387    0.444
write.csv(stdsolution, "150Grad.csv")
semPaths(mediationmodel,
        whatLabels = "std.all", structural = FALSE,
        edge.label.color = "black", label.prop=0.9, edge.label.cex = 1.5,
        equalizeManifests = FALSE, optimizeLatRes = FALSE, node.width = 1.5, 
        edge.width = 0.5, shapeMan = "rectangle", shapeLat = "ellipse", 
        shapeInt = "square", sizeMan = 6, sizeInt = 3, sizeLat = 4,
        unCol = "#070b8c", title = TRUE, intercepts = FALSE, residuals = FALSE)

EnglDis<- Placement %>%
  subset(College_English_Grade %in% c("A", "B", "C", "D", "F")) %>%
dplyr::select(College_English_Grade, ACT_Engl, HSGPA)
EnglDis<- na.omit(EnglDis)

MathDis<- Placement %>%
  subset(College_Math_Grade %in% c("A", "B", "C", "D", "F")) %>%
  dplyr::select(College_Math_Grade, ACT_Math, HSGPA)
MathDis<- na.omit(MathDis)
library(tidyverse)
library(caret)
library(MASS)
theme_set(theme_classic())
set.seed(123)

training.samples <- EnglDis$College_English_Grade %>%
  createDataPartition(p = .08, list = FALSE)
train.data<- EnglDis[training.samples, ]
test.data<- EnglDis[-training.samples, ]

#Estimate preprocessing parameters
preproc.param <- train.data %>% 
  preProcess(method = c("center", "scale"))
# Transform the data using the estimated parameters
train.transformed <- preproc.param %>% predict(train.data)
test.transformed <- preproc.param %>% predict(test.data)

# Fit the model
model <- lda(College_English_Grade ~., data = train.transformed)
# Make predictions
predictions <- model %>% predict(test.transformed)
# Model accuracy
mean(predictions$class==test.transformed$College_English_Grade)
## [1] 0.4017192
model2 <- lda(College_English_Grade~., data = train.transformed)
model2
## Call:
## lda(College_English_Grade ~ ., data = train.transformed)
## 
## Prior probabilities of groups:
##          A          B          C          D          F 
## 0.31168831 0.33116883 0.20129870 0.03246753 0.12337662 
## 
## Group means:
##      ACT_Engl      HSGPA
## A  0.23208565  0.3688045
## B -0.08910980 -0.0125984
## C  0.07726752 -0.1284682
## D  0.04366259 -0.4278793
## F -0.48469040 -0.5756941
## 
## Coefficients of linear discriminants:
##                LD1        LD2
## ACT_Engl -0.365226  1.0043104
## HSGPA    -0.854303 -0.6830999
## 
## Proportion of trace:
##    LD1    LD2 
## 0.8985 0.1015
plot(model2)

predictions <- model %>% predict(test.transformed)
names(predictions)
## [1] "class"     "posterior" "x"
# Predicted classes
head(predictions$class, 6)
## [1] B B B B A B
## Levels: A B C D F
# Predicted probabilities of class memebership.
head(predictions$posterior, 6) 
##            A         B         C          D          F
## 28 0.2644964 0.3409906 0.2309615 0.03964563 0.12390596
## 58 0.1599813 0.3055811 0.2617766 0.06731772 0.20534328
## 72 0.3172949 0.3537712 0.2014083 0.02770938 0.09981627
## 74 0.2700130 0.3144775 0.2602087 0.04993657 0.10536422
## 87 0.3803339 0.3655753 0.1600655 0.01637007 0.07765525
## 94 0.2400080 0.3707129 0.1975472 0.03061668 0.16111532
# Linear discriminants
head(predictions$x, 3) 
##           LD1        LD2
## 28  0.3268585  0.4407275
## 58  1.3258382  1.2395107
## 72 -0.0905183 -0.1999316
lda.data <- cbind(train.transformed, predict(model2)$x)
ggplot(lda.data, aes(LD1, LD2)) +
  geom_point(aes(color = College_English_Grade))

mean(predictions$class==test.transformed$College_English_Grade)
## [1] 0.4017192
library(tidyverse)
library(caret)
library(MASS)
theme_set(theme_classic())
set.seed(123)

training.samples <- MathDis$College_Math_Grade %>%
  createDataPartition(p = .08, list = FALSE)
train.data<- MathDis[training.samples, ]
test.data<- MathDis[-training.samples, ]

#Estimate preprocessing parameters
preproc.param <- train.data %>% 
  preProcess(method = c("center", "scale"))
# Transform the data using the estimated parameters
train.transformed <- preproc.param %>% predict(train.data)
test.transformed <- preproc.param %>% predict(test.data)

# Fit the model
model <- lda(College_Math_Grade ~., data = train.transformed)
# Make predictions
predictions <- model %>% predict(test.transformed)
# Model accuracy
mean(predictions$class==test.transformed$College_Math_Grade)
## [1] 0.3453193
model2 <- lda(College_Math_Grade~., data = train.transformed)
model2
## Call:
## lda(College_Math_Grade ~ ., data = train.transformed)
## 
## Prior probabilities of groups:
##          A          B          C          D          F 
## 0.30555556 0.27083333 0.21527778 0.05555556 0.15277778 
## 
## Group means:
##      ACT_Math      HSGPA
## A  0.49733961  0.4875320
## B -0.12881802  0.1339826
## C -0.05746451 -0.2939056
## D -0.72560896 -0.2651124
## F -0.42148948 -0.7020345
## 
## Coefficients of linear discriminants:
##                 LD1        LD2
## ACT_Math -0.5940894  0.9031001
## HSGPA    -0.7942199 -0.7695481
## 
## Proportion of trace:
##   LD1   LD2 
## 0.885 0.115
plot(model2)

predictions <- model %>% predict(test.transformed)
names(predictions)
## [1] "class"     "posterior" "x"
# Predicted classes
head(predictions$class, 6)
## [1] C F B A B B
## Levels: A B C D F
# Predicted probabilities of class memebership.
head(predictions$posterior, 6) 
##             A         B         C          D          F
## 28  0.1589255 0.2409906 0.3022905 0.05442938 0.24336397
## 73  0.1003498 0.2595153 0.2674542 0.09575122 0.27692943
## 87  0.2428463 0.3644484 0.2042224 0.07322699 0.11525592
## 88  0.5809703 0.2617939 0.1142613 0.01587443 0.02710012
## 95  0.2340268 0.2936699 0.2599024 0.05272202 0.15967885
## 116 0.2365119 0.2950751 0.2583754 0.05260370 0.15743390
# Linear discriminants
head(predictions$x, 3) 
##           LD1        LD2
## 28 0.78381501  0.6337491
## 73 1.22682933 -0.2000195
## 87 0.08523922 -0.8851400
lda.data <- cbind(train.transformed, predict(model2)$x)
ggplot(lda.data, aes(LD1, LD2)) +
  geom_point(aes(color = College_Math_Grade))

mean(predictions$class==test.transformed$College_Math_Grade)
## [1] 0.3453193
corrtable1<- Placement %>%
  dplyr:: select(LCCCGPA, HSGPA, ACT_Reading, ACT_Engl, ACT_Math, HSGradYears)
corrtable1$HSGradYears<- as.numeric(corrtable1$HSGradYears)

apa.cor.table(corrtable1)
## 
## 
## Means, standard deviations, and correlations with confidence intervals
##  
## 
##   Variable       M     SD   1          2            3           4          
##   1. LCCCGPA     2.68  0.98                                                
##                                                                            
##   2. HSGPA       2.97  0.57 .33**                                          
##                             [.31, .35]                                     
##                                                                            
##   3. ACT_Reading 20.49 4.96 .23**      .39**                               
##                             [.19, .26] [.36, .42]                          
##                                                                            
##   4. ACT_Engl    19.09 4.71 .26**      .44**        .75**                  
##                             [.23, .30] [.41, .47]   [.73, .76]             
##                                                                            
##   5. ACT_Math    19.16 3.79 .22**      .42**        .53**       .63**      
##                             [.19, .26] [.38, .45]   [.51, .56]  [.61, .65] 
##                                                                            
##   6. HSGradYears 3.06  6.46 .12**      -.21**       .00         -.01       
##                             [.10, .14] [-.23, -.19] [-.03, .04] [-.04, .03]
##                                                                            
##   5          
##              
##              
##              
##              
##              
##              
##              
##              
##              
##              
##              
##              
##              
##              
##   -.03       
##   [-.06, .01]
##              
## 
## Note. M and SD are used to represent mean and standard deviation, respectively.
## Values in square brackets indicate the 95% confidence interval.
## The confidence interval is a plausible range of population correlations 
## that could have caused the sample correlation (Cumming, 2014).
##  * indicates p < .05. ** indicates p < .01.
## 
gpamodel<- lm(LCCCGPA ~ HSGPA + ACT_Reading + ACT_Engl + ACT_Math + HSGradYears, data = corrtable1)
summary(gpamodel)
## 
## Call:
## lm(formula = LCCCGPA ~ HSGPA + ACT_Reading + ACT_Engl + ACT_Math + 
##     HSGradYears, data = corrtable1)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.3582 -0.4833  0.2111  0.6411  2.7973 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.3216354  0.1136789  -2.829 0.004697 ** 
## HSGPA        0.8197027  0.0361187  22.695  < 2e-16 ***
## ACT_Reading  0.0009008  0.0053312   0.169 0.865829    
## ACT_Engl     0.0124825  0.0061368   2.034 0.042037 *  
## ACT_Math     0.0047272  0.0061797   0.765 0.444356    
## HSGradYears  0.0283269  0.0082254   3.444 0.000582 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9303 on 2875 degrees of freedom
##   (6541 observations deleted due to missingness)
## Multiple R-squared:  0.2174, Adjusted R-squared:  0.216 
## F-statistic: 159.7 on 5 and 2875 DF,  p-value: < 2.2e-16
VIF(gpamodel)
##       HSGPA ACT_Reading    ACT_Engl    ACT_Math HSGradYears 
##    1.319281    2.288639    2.731945    1.729197    1.010516
placementyears<- Placement %>%
  subset(HSGradYears>0) %>%
  dplyr::select(LCCCGPA, HSGPA, HSGradYears)%>%
  na.omit(placementyears)
placementyears$HSGradYears<- as.numeric(placementyears$HSGradYears)

placementyears<-
  mutate(placementyears,HSGPACat=case_when(HSGPA >= 0 & HSGPA < 1 ~ 'F', HSGPA >= 1 & HSGPA < 2 ~ 'D', HSGPA >=2 & HSGPA < 3 ~ 'C', HSGPA >= 3 & HSGPA < 4 ~ 'B', HSGPA >= 4 ~ 'A'))

placementyears<-
 mutate(placementyears,HSDegreeCat=case_when(HSGradYears < 5 ~ '0 to 4.9', HSGradYears >=10 ~ '10 or More',HSGradYears >= 5 &  HSGradYears <10 ~'5 to 9.9'))

placementyears$new = factor(placementyears$HSDegreeCat, levels=c("0 to 4.9", "5 to 9.9", "10 or More"), labels=c("0 to 4.9 Years", "5 to 9.9 Years", "10 or More Years")) 

ggplot(placementyears, aes(x= HSGPACat, y=LCCCGPA))+
geom_boxplot(fill = "dodgerblue4")+             
facet_grid(.~new)+
ggtitle("Effects of HS Grades on College GPA by Years since HS Graduation")+
scale_x_discrete(name="Years Since HS, and High School GPA Letter Equivalent")+
scale_y_continuous(name="College Grade Point Average")

ggplot(placementyears, aes(HSGradYears,LCCCGPA))+
geom_point()+
scale_y_continuous(name = "College GPA")+
scale_x_continuous(name = "High School Degree Age")+
ggtitle("The Correlation Between High School Degree Age and College Grade Point Average")+
stat_smooth(method = "lm", col = "dodgerblue4")

ppym<- Placement %>%
  subset(HSGradYears>0) %>%
  dplyr::select(College_Math_Pass, HSGPA, ACT_Math, HSGradYears)%>%
  na.omit(ppym)
ppym$HSGradYears<- as.numeric(ppym$HSGradYears)


mathgrady<- glm(formula = College_Math_Pass ~ HSGPA + HSGradYears + ACT_Math, family = "binomial", data = ppym)
summary(mathgrady)
## 
## Call:
## glm(formula = College_Math_Pass ~ HSGPA + HSGradYears + ACT_Math, 
##     family = "binomial", data = ppym)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.3477   0.4392   0.5755   0.7086   1.3787  
## 
## Coefficients:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept) -2.62764    0.47661  -5.513 3.52e-08 ***
## HSGPA        1.00941    0.13048   7.736 1.02e-14 ***
## HSGradYears  0.09954    0.04196   2.372   0.0177 *  
## ACT_Math     0.03450    0.01791   1.927   0.0540 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 1630.1  on 1585  degrees of freedom
## Residual deviance: 1549.9  on 1582  degrees of freedom
## AIC: 1557.9
## 
## Number of Fisher Scoring iterations: 4
VIF(mathgrady)
##       HSGPA HSGradYears    ACT_Math 
##    1.098365    1.034598    1.063070
OddsRatio(mathgrady)
## 
## Call:
## glm(formula = College_Math_Pass ~ HSGPA + HSGradYears + ACT_Math, 
##     family = "binomial", data = ppym)
## 
## Odds Ratios:
##                or or.lci or.uci Pr(>|z|)    
## (Intercept) 0.072  0.028  0.183 3.52e-08 ***
## HSGPA       2.744  2.127  3.549 1.02e-14 ***
## HSGradYears 1.105  1.025  1.209   0.0177 *  
## ACT_Math    1.035  1.000  1.072   0.0540 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
## 
## Brier Score: 0.158     Nagelkerke R2: 0.077
###This Gives Goodness of Fit

performance::performance_hosmer(mathgrady, n_bins = 10)
## # Hosmer-Lemeshow Goodness-of-Fit Test
## 
##   Chi-squared: 16.226
##            df:  8    
##       p-value:  0.039
###This gives omnibus test
lmtest::lrtest(mathgrady)
## Likelihood ratio test
## 
## Model 1: College_Math_Pass ~ HSGPA + HSGradYears + ACT_Math
## Model 2: College_Math_Pass ~ 1
##   #Df  LogLik Df  Chisq Pr(>Chisq)    
## 1   4 -774.97                         
## 2   1 -815.06 -3 80.167  < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Placement<- read.csv("Placement.csv")

epym<- Placement %>%
  subset(HSGradYears>0) %>%
  dplyr::select(College_English_Pass, HSGPA, ACT_Engl, ACT_Reading, HSGradYears)%>%
  na.omit(epym)
epym$HSGradYears<- as.numeric(epym$HSGradYears)


enggrady<- glm(formula = College_English_Pass ~ HSGPA + HSGradYears + ACT_Engl + ACT_Reading, family = "binomial", data = epym)
summary(enggrady)
## 
## Call:
## glm(formula = College_English_Pass ~ HSGPA + HSGradYears + ACT_Engl + 
##     ACT_Reading, family = "binomial", data = epym)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.6545   0.3278   0.4647   0.6288   1.4548  
## 
## Coefficients:
##              Estimate Std. Error z value Pr(>|z|)    
## (Intercept) -2.705084   0.438024  -6.176 6.59e-10 ***
## HSGPA        1.297208   0.144566   8.973  < 2e-16 ***
## HSGradYears  0.104138   0.054372   1.915   0.0555 .  
## ACT_Engl     0.022994   0.022648   1.015   0.3100    
## ACT_Reading  0.009956   0.021419   0.465   0.6421    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 1481.6  on 1709  degrees of freedom
## Residual deviance: 1363.4  on 1705  degrees of freedom
## AIC: 1373.4
## 
## Number of Fisher Scoring iterations: 5
VIF(enggrady)
##       HSGPA HSGradYears    ACT_Engl ACT_Reading 
##    1.131974    1.022223    2.012831    1.994732
OddsRatio(enggrady)
## 
## Call:
## glm(formula = College_English_Pass ~ HSGPA + HSGradYears + ACT_Engl + 
##     ACT_Reading, family = "binomial", data = epym)
## 
## Odds Ratios:
##                or or.lci or.uci  Pr(>|z|)    
## (Intercept) 0.067  0.028  0.157  6.59e-10 ***
## HSGPA       3.659  2.764  4.873 < 2.2e-16 ***
## HSGradYears 1.110  1.006  1.246    0.0555 .  
## ACT_Engl    1.023  0.979  1.070    0.3100    
## ACT_Reading 1.010  0.969  1.054    0.6421    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
## 
## Brier Score: 0.123     Nagelkerke R2: 0.115
##This gives goodness of fit
performance::performance_hosmer(enggrady, n_bins = 10)
## # Hosmer-Lemeshow Goodness-of-Fit Test
## 
##   Chi-squared: 8.370
##            df: 8    
##       p-value: 0.398
##This gives omnibus test
lmtest::lrtest(enggrady)
## Likelihood ratio test
## 
## Model 1: College_English_Pass ~ HSGPA + HSGradYears + ACT_Engl + ACT_Reading
## Model 2: College_English_Pass ~ 1
##   #Df  LogLik Df  Chisq Pr(>Chisq)    
## 1   5 -681.71                         
## 2   1 -740.80 -4 118.16  < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
yearstable<- 
  table(placementyears$new)

yearstable
## 
##   0 to 4.9 Years   5 to 9.9 Years 10 or More Years 
##             5546              602              626
prop.table(yearstable)
## 
##   0 to 4.9 Years   5 to 9.9 Years 10 or More Years 
##       0.81871863       0.08886921       0.09241216
library(lavaan)
library(semPlot)

data<- Placement%>%
  subset(HSGradYears>0)%>%
  subset(HSGPA>0)

data <-  mutate(data, MathGrade = case_when(College_Math_Grade == "A" ~ 5,
             College_Math_Grade == "B" ~ 4,
             College_Math_Grade == "C"~ 3,
             College_Math_Grade == "D" ~ 2,
             College_Math_Grade == "F" ~ 1))

data <-  mutate(data, EngGrade = case_when(College_English_Grade == "A" ~ 5,
             College_English_Grade == "B" ~ 4,
             College_English_Grade == "C"~ 3,
             College_English_Grade == "D" ~ 2,
             College_English_Grade == "F" ~ 1))

data$EngGrade<- as.numeric(data$EngGrade)
data$MathGrade<- as.numeric(data$MathGrade)
data$HSGradYears<-as.numeric(data$HSGradYears)
table(data$Col_Math_Term, data$MathGrade)
##        
##          1  2  3  4  5
##   10/FA 10  3 22 32 25
##   11/FA 21  8 22 26 29
##   11/SP 16  7 27 33 27
##   12/FA 12 14 25 26 17
##   12/SP 10 12 23 24 23
##   13/FA 25 11 41 39 34
##   13/SP 23 11 31 45 40
##   14/FA 11  9 49 36 56
##   14/SP 17 23 40 48 40
##   15/FA 27 12 52 77 67
##   15/SP 14  2 30 52 43
##   16/FA 33 11 57 68 79
##   16/SP 25 10 39 54 49
##   17/FA 27 11 46 66 78
##   17/SP 25  8 26 57 51
##   18/FA 18 15 43 60 69
##   18/SP 16  8 42 33 39
##   19/FA 37 12 37 60 77
##   19/SP 18  7 22 41 42
##   20/FA 61 15 74 70 87
##   20/SP  7  2 21 34 40
##   21/FA 54 13 63 76 78
##   21/SP 36  8 46 43 64
table(data$Col_Eng_Term, data$EngGrade)
##        
##           1   2   3   4   5
##   10/FA   6   3  32  37  61
##   11/FA   8   5  22  60  61
##   11/SP   5   4  20  31  46
##   12/FA   9   5  26  42  53
##   12/SP  13   3  18  28  42
##   13/FA  10   2  27  72  45
##   13/SP   5   1  20  30  41
##   14/FA  10   3  32  73  88
##   14/SP  10   3  23  25  35
##   15/FA  34  10  48  99  97
##   15/SP   6   3  23  47  45
##   16/FA  31   8  61  87 105
##   16/SP  23   1  30  47  37
##   17/FA  34   8  52 103  96
##   17/SP  24   5  20  33  44
##   18/FA  24   4  52  86  84
##   18/SP  16   4  25  43  42
##   19/FA  21   8  56 109  95
##   19/SP  26   2  21  30  44
##   20/FA  36   6  36  69  72
##   20/SP  11   4  15  35  40
##   21/FA  44   3  31  48  47
##   21/SP  16   8  18  31  25
table(data$MathGrade)
## 
##    1    2    3    4    5 
##  543  232  878 1100 1154
prop.table(table(data$MathGrade))
## 
##         1         2         3         4         5 
## 0.1389813 0.0593806 0.2247249 0.2815459 0.2953673
table(data$EngGrade)
## 
##    1    2    3    4    5 
##  422  103  708 1265 1345
prop.table(table(data$EngGrade))
## 
##          1          2          3          4          5 
## 0.10981004 0.02680198 0.18423107 0.32916992 0.34998699
mediation.model <- ' 
             # mediator
             HSGradYears ~ a*HSGPA
             HSGradYears ~ b*LCCCGPA 
           
             # direct effect
             HSGPA ~  c*LCCCGPA

           # indirect effect (a*b)
             ab := a*b

           # total effect
             total := c + (a*b)

         '

fit <- sem(mediation.model, data = data)

summary(fit, fit.measures=T, standardized=T, ci=TRUE, rsquare=T)
## lavaan 0.6-12 ended normally after 1 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                         5
## 
##   Number of observations                          6774
## 
## Model Test User Model:
##                                                       
##   Test statistic                                 0.000
##   Degrees of freedom                                 0
## 
## Model Test Baseline Model:
## 
##   Test statistic                              1292.578
##   Degrees of freedom                                 3
##   P-value                                        0.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    1.000
##   Tucker-Lewis Index (TLI)                       1.000
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)             -26317.457
##   Loglikelihood unrestricted model (H1)     -26317.457
##                                                       
##   Akaike (AIC)                               52644.913
##   Bayesian (BIC)                             52679.017
##   Sample-size adjusted Bayesian (BIC)        52663.128
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.000
##   90 Percent confidence interval - lower         0.000
##   90 Percent confidence interval - upper         0.000
##   P-value RMSEA <= 0.05                             NA
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.000
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##   HSGradYears ~                                                         
##     HSGPA      (a)   -2.611    0.117  -22.269    0.000   -2.840   -2.381
##     LCCCGPA    (b)    1.234    0.067   18.461    0.000    1.103    1.365
##   HSGPA ~                                                               
##     LCCCGPA    (c)    0.176    0.007   26.683    0.000    0.163    0.189
##    Std.lv  Std.all
##                   
##    -2.611   -0.272
##     1.234    0.225
##                   
##     0.176    0.308
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##    .HSGradYears      27.495    0.472   58.198    0.000   26.569   28.421
##    .HSGPA             0.295    0.005   58.198    0.000    0.285    0.305
##    Std.lv  Std.all
##    27.495    0.913
##     0.295    0.905
## 
## R-Square:
##                    Estimate
##     HSGradYears       0.087
##     HSGPA             0.095
## 
## Defined Parameters:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##     ab               -3.222    0.259  -12.451    0.000   -3.729   -2.715
##     total            -3.046    0.259  -11.767    0.000   -3.553   -2.539
##    Std.lv  Std.all
##    -3.222   -0.061
##    -3.046    0.247
medtable<- standardizedsolution(fit, type = "std.all")
medtable
##           lhs op         rhs label est.std    se       z pvalue ci.lower
## 1 HSGradYears  ~       HSGPA     a  -0.272 0.012 -23.014      0   -0.295
## 2 HSGradYears  ~     LCCCGPA     b   0.225 0.012  19.110      0    0.202
## 3       HSGPA  ~     LCCCGPA     c   0.308 0.011  28.741      0    0.287
## 4 HSGradYears ~~ HSGradYears         0.913 0.007 139.784      0    0.900
## 5       HSGPA ~~       HSGPA         0.905 0.007 136.731      0    0.892
## 6     LCCCGPA ~~     LCCCGPA         1.000 0.000      NA     NA    1.000
## 7          ab :=         a*b    ab  -0.061 0.005 -13.211      0   -0.070
## 8       total :=     c+(a*b) total   0.247 0.012  21.442      0    0.225
##   ci.upper
## 1   -0.249
## 2    0.248
## 3    0.329
## 4    0.926
## 5    0.918
## 6    1.000
## 7   -0.052
## 8    0.270
library(diagram)
dataplot <- c(0, "'-.27*'", 0,
          0, 0, 0, 
          "'.23*'", "'.31* (-.06*)'", 0)
M<- matrix (nrow=3, ncol=3, byrow = TRUE, data=dataplot)
plot<- plotmat (M, pos=c(1,2), 
                name= c( "Years Since HS","High School GPA", "College GPA"), 
                box.type = "rect", box.size = 0.12, box.prop=0.5,  curve=0)

library(lavaan)
library(semPlot)


mediation.model2 <- ' 
             # mediator
             HSGPA ~ a*HSGradYears
             MathGrade ~ b*HSGradYears
           
             # direct effect
             HSGPA ~  c*MathGrade

           # indirect effect (a*b)
             ab := a*b

           # total effect
             total := c + (a*b)
         '

fit2 <- sem(mediation.model2, data = data, ordered = "MathGrade")

summary(fit2, fit.measures=T, standardized=T, ci=TRUE)
## lavaan 0.6-12 ended normally after 13 iterations
## 
##   Estimator                                       DWLS
##   Optimization method                           NLMINB
##   Number of model parameters                         9
## 
##                                                   Used       Total
##   Number of observations                          3907        6774
## 
## Model Test User Model:
##                                               Standard      Robust
##   Test Statistic                                 0.000       0.000
##   Degrees of freedom                                 0           0
## 
## Model Test Baseline Model:
## 
##   Test statistic                               347.058     347.058
##   Degrees of freedom                                 1           1
##   P-value                                        0.000       0.000
##   Scaling correction factor                                  1.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    1.000       1.000
##   Tucker-Lewis Index (TLI)                       1.000       1.000
##                                                                   
##   Robust Comparative Fit Index (CFI)                            NA
##   Robust Tucker-Lewis Index (TLI)                               NA
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.000       0.000
##   90 Percent confidence interval - lower         0.000       0.000
##   90 Percent confidence interval - upper         0.000       0.000
##   P-value RMSEA <= 0.05                             NA          NA
##                                                                   
##   Robust RMSEA                                                  NA
##   90 Percent confidence interval - lower                     0.000
##   90 Percent confidence interval - upper                     0.000
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.000       0.000
## 
## Parameter Estimates:
## 
##   Standard errors                           Robust.sem
##   Information                                 Expected
##   Information saturated (h1) model        Unstructured
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##   HSGPA ~                                                               
##     HSGradYers (a)   -0.030    0.001  -22.121    0.000   -0.032   -0.027
##   MathGrade ~                                                           
##     HSGradYers (b)    0.015    0.003    4.593    0.000    0.009    0.022
##   HSGPA ~                                                               
##     MathGrade  (c)    0.155    0.008   18.629    0.000    0.139    0.172
##    Std.lv  Std.all
##                   
##    -0.030   -0.267
##                   
##     0.015    0.076
##                   
##     0.155    0.286
## 
## Intercepts:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##    .HSGPA             3.167    0.010  304.819    0.000    3.147    3.187
##    .MathGrade         0.000                               0.000    0.000
##    Std.lv  Std.all
##     3.167    5.814
##     0.000    0.000
## 
## Thresholds:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##     MathGrade|t1     -1.048    0.026  -39.699    0.000   -1.099   -0.996
##     MathGrade|t2     -0.810    0.024  -33.124    0.000   -0.858   -0.762
##     MathGrade|t3     -0.155    0.022   -6.998    0.000   -0.198   -0.111
##     MathGrade|t4      0.579    0.023   24.918    0.000    0.534    0.625
##    Std.lv  Std.all
##    -1.048   -1.045
##    -0.810   -0.807
##    -0.155   -0.154
##     0.579    0.577
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##    .HSGPA             0.255    0.006   42.056    0.000    0.243    0.267
##    .MathGrade         1.000                               1.000    1.000
##    Std.lv  Std.all
##     0.255    0.859
##     1.000    0.994
## 
## Scales y*:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##     MathGrade         1.000                               1.000    1.000
##    Std.lv  Std.all
##     1.000    1.000
## 
## Defined Parameters:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##     ab               -0.000    0.000   -4.280    0.000   -0.001   -0.000
##     total             0.155    0.008   18.560    0.000    0.138    0.171
##    Std.lv  Std.all
##    -0.000   -0.020
##     0.155    0.265
medtable2<- standardizedsolution(fit2, type = "std.all")
medtable2
##            lhs  op         rhs label est.std    se       z pvalue ci.lower
## 1        HSGPA   ~ HSGradYears     a  -0.267 0.011 -24.597      0   -0.288
## 2    MathGrade   ~ HSGradYears     b   0.076 0.016   4.620      0    0.044
## 3        HSGPA   ~   MathGrade     c   0.286 0.014  20.142      0    0.258
## 4    MathGrade   |          t1        -1.045 0.027 -39.033      0   -1.097
## 5    MathGrade   |          t2        -0.807 0.025 -32.629      0   -0.856
## 6    MathGrade   |          t3        -0.154 0.022  -6.972      0   -0.198
## 7    MathGrade   |          t4         0.577 0.023  25.232      0    0.533
## 8        HSGPA  ~~       HSGPA         0.859 0.009  92.105      0    0.841
## 9    MathGrade  ~~   MathGrade         0.994 0.003 397.582      0    0.989
## 10 HSGradYears  ~~ HSGradYears         1.000 0.000      NA     NA    1.000
## 11   MathGrade ~*~   MathGrade         1.000 0.000      NA     NA    1.000
## 12       HSGPA  ~1                     5.814 0.066  88.677      0    5.685
## 13   MathGrade  ~1                     0.000 0.000      NA     NA    0.000
## 14 HSGradYears  ~1                     0.527 0.000      NA     NA    0.527
## 15          ab  :=         a*b    ab  -0.020 0.005  -4.295      0   -0.030
## 16       total  :=     c+(a*b) total   0.265 0.015  17.529      0    0.236
##    ci.upper
## 1    -0.245
## 2     0.108
## 3     0.314
## 4    -0.992
## 5    -0.759
## 6    -0.111
## 7     0.622
## 8     0.877
## 9     0.999
## 10    1.000
## 11    1.000
## 12    5.942
## 13    0.000
## 14    0.527
## 15   -0.011
## 16    0.295
library(diagram)
dataplot2 <- c(0, "'-.27*'", 0,
          0, 0, 0, 
          "'.08*'", "'.29* (-.02*)'", 0)
M<- matrix (nrow=3, ncol=3, byrow = TRUE, data=dataplot2)
plot<- plotmat (M, pos=c(1,2), 
                name= c( "Years Since HS","High School GPA", "Math Grade"), 
                box.type = "rect", box.size = 0.12, box.prop=0.5,  curve=0)

library(lavaan)
library(semPlot)


mediation.model3 <- ' 
             # mediator
             HSGPA ~ a*HSGradYears
             EngGrade ~ b*HSGradYears
           
             # direct effect
             HSGPA ~  c*EngGrade

           # indirect effect (a*b)
             ab := a*b

           # total effect
             total := c + (a*b)
         '
         

fit3 <- sem(mediation.model3, data = data, ordered = "EngGrade")

summary(fit3, fit.measures=T, standardized=T, ci=TRUE)
## lavaan 0.6-12 ended normally after 13 iterations
## 
##   Estimator                                       DWLS
##   Optimization method                           NLMINB
##   Number of model parameters                         9
## 
##                                                   Used       Total
##   Number of observations                          3843        6774
## 
## Model Test User Model:
##                                               Standard      Robust
##   Test Statistic                                 0.000       0.000
##   Degrees of freedom                                 0           0
## 
## Model Test Baseline Model:
## 
##   Test statistic                               328.895     328.895
##   Degrees of freedom                                 1           1
##   P-value                                        0.000       0.000
##   Scaling correction factor                                  1.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    1.000       1.000
##   Tucker-Lewis Index (TLI)                       1.000       1.000
##                                                                   
##   Robust Comparative Fit Index (CFI)                            NA
##   Robust Tucker-Lewis Index (TLI)                               NA
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.000       0.000
##   90 Percent confidence interval - lower         0.000       0.000
##   90 Percent confidence interval - upper         0.000       0.000
##   P-value RMSEA <= 0.05                             NA          NA
##                                                                   
##   Robust RMSEA                                                  NA
##   90 Percent confidence interval - lower                     0.000
##   90 Percent confidence interval - upper                     0.000
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.000       0.000
## 
## Parameter Estimates:
## 
##   Standard errors                           Robust.sem
##   Information                                 Expected
##   Information saturated (h1) model        Unstructured
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##   HSGPA ~                                                               
##     HSGradYers (a)   -0.031    0.002  -18.220    0.000   -0.034   -0.028
##   EngGrade ~                                                            
##     HSGradYers (b)    0.035    0.004    9.710    0.000    0.028    0.042
##   HSGPA ~                                                               
##     EngGrade   (c)    0.167    0.009   18.135    0.000    0.149    0.185
##    Std.lv  Std.all
##                   
##    -0.031   -0.267
##                   
##     0.035    0.163
##                   
##     0.167    0.306
## 
## Intercepts:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##    .HSGPA             2.974    0.010  301.638    0.000    2.955    2.994
##    .EngGrade          0.000                               0.000    0.000
##    Std.lv  Std.all
##     2.974    5.365
##     0.000    0.000
## 
## Thresholds:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##     EngGrade|t1      -1.159    0.028  -40.960    0.000   -1.214   -1.103
##     EngGrade|t2      -1.027    0.027  -38.322    0.000   -1.079   -0.974
##     EngGrade|t3      -0.392    0.023  -17.199    0.000   -0.437   -0.348
##     EngGrade|t4       0.470    0.023   20.468    0.000    0.425    0.515
##    Std.lv  Std.all
##    -1.159   -1.143
##    -1.027   -1.013
##    -0.392   -0.387
##     0.470    0.464
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##    .HSGPA             0.265    0.007   38.410    0.000    0.251    0.278
##    .EngGrade          1.000                               1.000    1.000
##    Std.lv  Std.all
##     0.265    0.862
##     1.000    0.973
## 
## Scales y*:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##     EngGrade          1.000                               1.000    1.000
##    Std.lv  Std.all
##     1.000    1.000
## 
## Defined Parameters:
##                    Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper
##     ab               -0.001    0.000   -7.801    0.000   -0.001   -0.001
##     total             0.166    0.009   18.034    0.000    0.148    0.184
##    Std.lv  Std.all
##    -0.001   -0.044
##     0.166    0.262
medtable3<- standardizedsolution(fit3, type = "std.all")
medtable3
##            lhs  op         rhs label est.std    se       z pvalue ci.lower
## 1        HSGPA   ~ HSGradYears     a  -0.267 0.014 -19.380      0   -0.294
## 2     EngGrade   ~ HSGradYears     b   0.163 0.016   9.975      0    0.131
## 3        HSGPA   ~    EngGrade     c   0.306 0.015  19.749      0    0.275
## 4     EngGrade   |          t1        -1.143 0.029 -39.317      0   -1.200
## 5     EngGrade   |          t2        -1.013 0.027 -36.862      0   -1.067
## 6     EngGrade   |          t3        -0.387 0.023 -16.882      0   -0.432
## 7     EngGrade   |          t4         0.464 0.022  20.916      0    0.420
## 8        HSGPA  ~~       HSGPA         0.862 0.010  83.173      0    0.842
## 9     EngGrade  ~~    EngGrade         0.973 0.005 182.927      0    0.963
## 10 HSGradYears  ~~ HSGradYears         1.000 0.000      NA     NA    1.000
## 11    EngGrade ~*~    EngGrade         1.000 0.000      NA     NA    1.000
## 12       HSGPA  ~1                     5.365 0.069  78.021      0    5.230
## 13    EngGrade  ~1                     0.000 0.000      NA     NA    0.000
## 14 HSGradYears  ~1                     0.500 0.000      NA     NA    0.500
## 15          ab  :=         a*b    ab  -0.044 0.005  -8.008      0   -0.054
## 16       total  :=     c+(a*b) total   0.262 0.016  16.334      0    0.231
##    ci.upper
## 1    -0.240
## 2     0.195
## 3     0.336
## 4    -1.086
## 5    -0.959
## 6    -0.342
## 7     0.507
## 8     0.882
## 9     0.984
## 10    1.000
## 11    1.000
## 12    5.500
## 13    0.000
## 14    0.500
## 15   -0.033
## 16    0.293
library(diagram)
dataplot3 <- c(0, "'-.27*'", 0,
          0, 0, 0, 
          "'.16*'", "'.31* (-.04*)'", 0)
M<- matrix (nrow=3, ncol=3, byrow = TRUE, data=dataplot3)
plot<- plotmat (M, pos=c(1,2), 
                name= c( "Years Since HS","High School GPA", "English Grade"), 
                box.type = "rect", box.size = 0.12, box.prop=0.5,  curve=0)