Created
February 6, 2013 23:29
-
-
Save dbetebenner/4726860 to your computer and use it in GitHub Desktop.
This code tests whether the SGP package picks out the right knots and boundaries associated with states using year specific knots and boundaries.
The SGPstateData is dummied up to test for this.
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
################################################################################################## | |
### | |
### Test of year specific knots | |
### | |
################################################################################################## | |
### Load SGP package | |
require(SGP) | |
options(error=recover) | |
options(warn=2) | |
#debug(analyzeSGP) | |
#debug(studentGrowthPercentiles) | |
###################################################################################### | |
### | |
### Step 1: Run a basic analysis with regular knots and boundaries | |
### | |
###################################################################################### | |
Demonstration_SGP <- prepareSGP(sgpData_LONG, create.additional.variables=FALSE) | |
DEMO.config <- list( | |
MATHEMATICS.2011_2012 = list( | |
sgp.content.areas=c('MATHEMATICS', 'MATHEMATICS', 'MATHEMATICS'), | |
sgp.panel.years=c('2009_2010', '2010_2011', '2011_2012'), | |
sgp.grade.sequences=list(c('3', '4'), c('3', '4', '5')), | |
sgp.exact.grade.progression=c(TRUE, TRUE))) | |
Demonstration_SGP <- analyzeSGP( | |
Demonstration_SGP, | |
sgp.percentiles=TRUE, | |
sgp.projections=FALSE, | |
sgp.projections.lagged=FALSE, | |
sgp.percentiles.baseline=FALSE, | |
sgp.projections.baseline=FALSE, | |
sgp.projections.lagged.baseline=FALSE, | |
sgp.config=DEMO.config, | |
verbose.output=TRUE) | |
###################################################################################### | |
### | |
### Step 2: Run a basic analysis with modified knots and boundaries | |
### | |
###################################################################################### | |
SGPstateData$DEMO$Achievement$Knots_Boundaries$MATHEMATICS.2010_2011 <- SGPstateData$DEMO$Achievement$Knots_Boundaries$READING | |
Demonstration_SGP <- prepareSGP(sgpData_LONG, create.additional.variables=FALSE) | |
DEMO.config <- list( | |
MATHEMATICS.2011_2012 = list( | |
sgp.content.areas=c('MATHEMATICS', 'MATHEMATICS', 'MATHEMATICS'), | |
sgp.panel.years=c('2009_2010', '2010_2011', '2011_2012'), | |
sgp.grade.sequences=list(c('3', '4'), c('3', '4', '5')), | |
sgp.exact.grade.progression=c(TRUE, TRUE))) | |
Demonstration_SGP <- analyzeSGP( | |
Demonstration_SGP, | |
sgp.percentiles=TRUE, | |
sgp.projections=FALSE, | |
sgp.projections.lagged=FALSE, | |
sgp.percentiles.baseline=FALSE, | |
sgp.projections.baseline=FALSE, | |
sgp.projections.lagged.baseline=FALSE, | |
sgp.config=DEMO.config, | |
verbose.output=TRUE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment