Last active
August 29, 2015 14:06
-
-
Save dbetebenner/df373168b7c32c868429 to your computer and use it in GitHub Desktop.
Basic Projections using just two grades (3 and 4) of data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################################################### | |
### | |
### Basic percentiles and projections for two grades of data | |
### | |
######################################################################### | |
### Load packages | |
require(SGP) | |
require(SGPdata) | |
### Create data set | |
my.data <- subset(sgpData, GRADE_2014==4 | GRADE_2013==3, select=c("ID", "GRADE_2014", "GRADE_2015", "SS_2014", "SS_2015")) | |
### First calculate SGPs for 2015 | |
my.grade.sequences <- list(3:4) | |
my.sgpData <- list(Panel_Data = my.data) | |
for (i in seq_along(my.grade.sequences)) { | |
my.sgpData <- studentGrowthPercentiles(panel.data=my.sgpData, | |
sgp.labels=list(my.year=2015, my.subject="Reading"), | |
grade.progression=my.grade.sequences[[i]]) | |
} | |
### | |
### Get the 3 grade students from 2014 | |
### | |
my.data.for.projections <- subset(my.data, GRADE_2014==3, select=c("ID", "GRADE_2014", "SS_2014")) | |
my.sgpData$Panel_Data <- my.data.for.projections | |
## Calculate Growth Projections | |
my.grade.progressions <- list(3) | |
for (i in seq_along(my.grade.progressions)) { | |
my.sgpData <- studentGrowthProjections(panel.data=my.sgpData, | |
sgp.labels=list(my.year=2014, my.subject="Reading"), | |
percentile.trajectory.values=c(25, 50, 75), | |
grade.progression=my.grade.progressions[[i]]) | |
} | |
### Save the Student Growth Projections Results to a .csv file: | |
write.csv(my.sgpData$SGProjections$READING.2015, file= "2015_Reading_SGProjections.csv", row.names=FALSE, quote=FALSE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment