Look at the original dataset

##   student_id plan_id                 name Grade Weekly_Assessments_Given
## 1          1     584 T1 Rational Counting    PK                        0
## 2          1     589             T1 Rhyme    PK                        1
## 3          1    1097    T1 Quantification    PK                        0
## 4          1    1173         T1 Syllables    PK                        0
## 5          1    1696    T1 Number Symbols    PK                        0
## 6          1    1908          T1 Phonemes    PK                        3
##   Number.of.Exit.Exam preclass_exit_exam first_exit_exam second_exit_exam
## 1                   1                 NA              80               NA
## 2                   1                 NA             100               NA
## 3                   1                 NA              NA              100
## 4                   1                 NA             100               NA
## 5                   1                 NA              NA               30
## 6                   2                 NA             100              100
##   third_exit_exam Maximum_Exit_Score Pass_Exam_or_Not
## 1              NA                 80             Pass
## 2              NA                100             Pass
## 3              NA                100             Pass
## 4              NA                100             Pass
## 5              NA                 30             Fail
## 6              NA                100             Pass

Plan Name

summary(factor(exit2$name))
##              T1 Addition Strategies           T1 Classification/Sorting 
##                                 159                                  19 
##                T1 Comparative Value                   T1 Compound Words 
##                                  85                                 256 
##                    T1 Conversations         T1 Expression: Ask & Answer 
##                                  36                                  73 
## T1 Expression: Descriptive Language                     T1 Final Sounds 
##                                 293                                   2 
##                   T1 Initial Sounds                   T1 Number Symbols 
##                                  30                                 423 
##                       T1 One-to-One               T1 Oral Comprehension 
##                                 324                                 200 
##                         T1 Ordering                         T1 Patterns 
##                                   9                                  10 
##                         T1 Phonemes                   T1 Quantification 
##                                 268                                 567 
##                T1 Rational Counting                            T1 Rhyme 
##                                 929                                 786 
##                    T1 Rote Counting                T1 Shape Composition 
##                                 255                                  12 
##             T1 Shape Identification                T1 Spatial Awareness 
##                                  27                                  14 
##           T1 Subtraction Strategies                        T1 Syllables 
##                                  37                                 336 
##                   T1 Word Awareness                    T2 Rote Counting 
##                                 534                                  13 
##                   T2 Word Awareness 
##                                   2
library('ggplot2')
ggplot(exit2, aes(x=NumExit)) + geom_density()

exit2 = exit2[exit2$NumExit<=3,] 

Build logistic regression model to check the effect of the number of exit exam on Pass

model <- glm(factor(Pass) ~ factor(Grade)+factor(NumExit),family=binomial(link='logit'),data=exit2)
summary(model)
## 
## Call:
## glm(formula = factor(Pass) ~ factor(Grade) + factor(NumExit), 
##     family = binomial(link = "logit"), data = exit2)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -1.8967   0.6015   0.6015   0.7215   0.8463  
## 
## Coefficients:
##                  Estimate Std. Error z value Pr(>|z|)    
## (Intercept)       1.61787    0.05424  29.829  < 2e-16 ***
## factor(Grade)PS  -0.40486    0.06731  -6.015  1.8e-09 ***
## factor(NumExit)2 -0.01713    0.08234  -0.208   0.8352    
## factor(NumExit)3 -0.37041    0.21603  -1.715   0.0864 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 5680.9  on 5677  degrees of freedom
## Residual deviance: 5642.0  on 5674  degrees of freedom
## AIC: 5650
## 
## Number of Fisher Scoring iterations: 4

In this case, I don’t consider the effect of different plan, the result shows that Grade have a grade impact on Pass. In addition, the number of exit exam is 3 also has a great impact on Pass.

Build logistic regression model for the following plans alone: T1 rhyme, T1 word awareness, T1 rote counting, and T1 one-to-one (those are the frequently used plans)

data1 = exit2[exit2$name %in% c('T1 Rational Counting','T1 Rythm','T1 Word Awareness','T1 One to One'),]
summary(factor(data1$Grade))
##  PK  PS 
## 692 758
summary(factor(data1$NumExit))
##    1    2    3 
## 1060  358   32
model1 <- glm(factor(Pass) ~ factor(Grade)+factor(NumExit),family=binomial(link='logit'), data = data1)
summary(model1)
## 
## Call:
## glm(formula = factor(Pass) ~ factor(Grade) + factor(NumExit), 
##     family = binomial(link = "logit"), data = data1)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.0411   0.5158   0.6672   0.8725   0.8725  
## 
## Coefficients:
##                  Estimate Std. Error z value Pr(>|z|)    
## (Intercept)        1.3890     0.1039  13.363  < 2e-16 ***
## factor(Grade)PS   -0.6195     0.1253  -4.944 7.66e-07 ***
## factor(NumExit)2   0.2076     0.1466   1.416    0.157    
## factor(NumExit)3   0.5610     0.4953   1.133    0.257    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 1629.7  on 1449  degrees of freedom
## Residual deviance: 1600.4  on 1446  degrees of freedom
## AIC: 1608.4
## 
## Number of Fisher Scoring iterations: 4

The effect of weekly Assessment given on Pass

model2 <- glm(factor(Pass) ~ factor(Weekly_Assessments_Given),family=binomial(link='logit'),data=data1)
summary(model2)
## 
## Call:
## glm(formula = factor(Pass) ~ factor(Weekly_Assessments_Given), 
##     family = binomial(link = "logit"), data = data1)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.0393   0.5168   0.7916   0.7916   0.8446  
## 
## Coefficients:
##                                   Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                        0.99977    0.07324  13.650   <2e-16 ***
## factor(Weekly_Assessments_Given)1  0.28588    0.18034   1.585   0.1129    
## factor(Weekly_Assessments_Given)2  0.45061    0.20414   2.207   0.0273 *  
## factor(Weekly_Assessments_Given)3 -0.15247    0.27091  -0.563   0.5736    
## factor(Weekly_Assessments_Given)4  0.94614    0.53952   1.754   0.0795 .  
## factor(Weekly_Assessments_Given)5  0.09885    1.15702   0.085   0.9319    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 1629.7  on 1449  degrees of freedom
## Residual deviance: 1618.9  on 1444  degrees of freedom
## AIC: 1630.9
## 
## Number of Fisher Scoring iterations: 4

stratified on Grade

model3 <- glm(factor(Pass) ~ factor(NumExit),family=binomial(link='logit'),data=data1[data1$Grade=='PS',])
summary(model3)
## 
## Call:
## glm(formula = factor(Pass) ~ factor(NumExit), family = binomial(link = "logit"), 
##     data = data1[data1$Grade == "PS", ])
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -1.6719  -1.5015   0.8849   0.8849   0.8849  
## 
## Coefficients:
##                  Estimate Std. Error z value Pr(>|z|)    
## (Intercept)       0.73571    0.08966   8.206  2.3e-16 ***
## factor(NumExit)2  0.37794    0.19552   1.933   0.0532 .  
## factor(NumExit)3  0.36291    0.67267   0.540   0.5895    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 932.09  on 757  degrees of freedom
## Residual deviance: 928.04  on 755  degrees of freedom
## AIC: 934.04
## 
## Number of Fisher Scoring iterations: 4
model4 <- glm(factor(Pass) ~ factor(NumExit),family=binomial(link='logit'),data=data1[data1$Grade=='PK',])
summary(model4)
## 
## Call:
## glm(formula = factor(Pass) ~ factor(NumExit), family = binomial(link = "logit"), 
##     data = data1[data1$Grade == "PK", ])
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.1460   0.6512   0.6512   0.6512   0.6576  
## 
## Coefficients:
##                  Estimate Std. Error z value Pr(>|z|)    
## (Intercept)       1.44316    0.11468  12.585   <2e-16 ***
## factor(NumExit)2 -0.02177    0.22050  -0.099    0.921    
## factor(NumExit)3  0.75407    0.75407   1.000    0.317    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 671.54  on 691  degrees of freedom
## Residual deviance: 670.29  on 689  degrees of freedom
## AIC: 676.29
## 
## Number of Fisher Scoring iterations: 4

In a word, after strafying on Grade, we can see that when the grade is PK, the number of exit exam has no effect on Pass, while when the grade is PS, the number of exit exam has some effect on Pass, which is exp(0.37794)=1.46. It means that NumExit=2 will increase the odd of Pass to 1.46 with other varialbes holds.