Last active
August 29, 2015 14:20
-
-
Save dbetebenner/4cec5fde2e33d9261977 to your computer and use it in GitHub Desktop.
Creation of lagged projections using lower level functions
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
################################################################################### | |
### | |
### Creation of lagged projections using lower level functions | |
### | |
################################################################################### | |
### Update SGP & SGPdata packages to latest on GitHub | |
require(devtools) | |
install_github("centerforassessment/SGPdata") | |
install_github("centerforassessment/SGP") | |
### Load SGP package | |
require(SGP) | |
require(SGPdata) | |
require(grid) | |
### Set up for tests | |
my.sgpData <- list(Panel_Data=sgpData) | |
### student growth percentiles | |
my.grade.sequences <- list(3:4, 3:5, 3:6, 3:7, 4:8) | |
for (i in seq_along(my.grade.sequences)) { | |
my.sgpData <- studentGrowthPercentiles( | |
panel.data=my.sgpData, | |
sgp.labels=list(my.year=2015, my.subject="Reading"), | |
growth.levels="DEMO", | |
goodness.of.fit="DEMO", | |
grade.progression=my.grade.sequences[[i]], | |
print.sgp.order=TRUE, | |
verbose.output=TRUE, | |
max.order.for.percentile=3, | |
return.norm.group.scale.scores=TRUE) | |
} | |
### Create PDFs of all Goodness of Fit results: | |
for (i in names(my.sgpData$Goodness_of_Fit$READING.2015)) { | |
pdf(file=paste(i, "_Reading_2015_GOF.pdf", sep=""), width=8.5, height=11) | |
grid.draw(my.sgpData[["Goodness_of_Fit"]][["READING.2015"]][[i]]) | |
dev.off() | |
} | |
### student growth projections for lagged data | |
my.sgpData$Panel_Data <- sgpData[,c("ID", "GRADE_2011", "GRADE_2012", "GRADE_2013", "GRADE_2014", "SS_2011", "SS_2012", "SS_2013", "SS_2014")] | |
my.grade.progressions <- list(3, 3:4, 3:5, 3:6, 4:7) | |
for (i in seq_along(my.grade.progressions)) { | |
my.sgpData <- studentGrowthProjections( | |
panel.data=my.sgpData, | |
sgp.labels=list(my.year=2015, my.subject="Reading", my.extra.label="LAGGED"), | |
use.my.coefficient.matrices=list(my.year=2015, my.subject="Reading"), | |
projcuts.digits=0, | |
performance.level.cutscores="DEMO", | |
percentile.trajectory.values=1:99, | |
lag.increment=1, | |
grade.progression=my.grade.progressions[[i]]) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment