Last active
December 14, 2015 20:28
-
-
Save dbetebenner/5143768 to your computer and use it in GitHub Desktop.
A basic test of the SGP function including print.other.gp, print.sgp.order. Also, changed the 'ID' variable name to show that naming convention works
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 test of studentGrowthPercentiles with verbose.output=TRUE option | |
### | |
################################################################################### | |
### Load SGP package | |
require(SGP) | |
options(error=recover) | |
options(warn=2) | |
my.grade.sequences <- list(3:4, 3:5, 3:6, 3:7, 4:8) | |
names(sgpData)[1] <- "SSID" | |
my.sgpData <- list(Panel_Data=sgpData) ### Put sgpData into Panel_Data slot | |
for (i in seq_along(my.grade.sequences)) { | |
my.sgpData <- studentGrowthPercentiles(panel.data=my.sgpData, | |
sgp.labels=list(my.year=2012, my.subject="Reading"), | |
growth.levels="DEMO", | |
goodness.of.fit="DEMO", | |
grade.progression=my.grade.sequences[[i]], | |
print.other.gp=TRUE, | |
print.sgp.order=TRUE, | |
verbose.output=TRUE, | |
return.prior.scale.score=FALSE, | |
return.prior.scale.score.standardized=FALSE) | |
} | |
# Create PDFs of all Goodness of Fit results: | |
require(grid) ### For grid.draw function | |
for (i in names(my.sgpData$Goodness_of_Fit$READING.2012)) { | |
pdf(file=paste(i, "_Reading_2012_GOF.pdf", sep=""), width=8.5, height=11) | |
grid.draw(my.sgpData[["Goodness_of_Fit"]][["READING.2012"]][[i]]) | |
dev.off() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment