-
Notifications
You must be signed in to change notification settings - Fork 0
DC Data Analysis 2016
In the following R code script, the student records from Washington DC are read in from the entire PARCC data SQL database. A SGP class object is created, placing this data in the @Data slot of the object. The data is then analyzed using two calls to the analyzeSGP function. The first calculates an uncorrected and SIMEX measurement error corrected version of the student growth percentiles. The second function produces student growth projections. The results are then merged into the @Data slot and the Scale Score targets are computed via the combineSGP function. Finally the results are writen to disc in various forms and file formats using outputSGP and the SGP object itself is saved.
#############################################################################
### ###
### SGP analysis script for PARCC Washington DC - Spring 2016 Analyses ###
### ###
#############################################################################
workers <- parallel::detectCores()/2
### Load Packages
require(SGP)
require(RSQLite)
require(data.table)
### Load configurations & combine
source("../SGP_CONFIG/2015_2016.2/ELA.R")
source("../SGP_CONFIG/2015_2016.2/ELA_SS.R")
source("../SGP_CONFIG/2015_2016.2/MATHEMATICS.R")
source("../SGP_CONFIG/2015_2016.2/MATHEMATICS_SS.R")
PARCC_2015_2016.2.config <- c(
ELA_2015_2016.2.config,
ELA_SS_2015_2016.2.config,
MATHEMATICS_2015_2016.config,
MATHEMATICS_SS_2015_2016.config,
ALGEBRA_I.2015_2016.config,
ALGEBRA_I_SS.2015_2016.config,
ALGEBRA_II.2015_2016.config,
ALGEBRA_II_SS.2015_2016.config,
GEOMETRY.2015_2016.config,
GEOMETRY_SS.2015_2016.config,
INTEGRATED_MATH_1.2015_2016.config,
INTEGRATED_MATH_1_SS.2015_2016.config,
INTEGRATED_MATH_2.2015_2016.config,
INTEGRATED_MATH_2_SS.2015_2016.config,
INTEGRATED_MATH_3.2015_2016.config,
INTEGRATED_MATH_3_SS.2015_2016.config
)
### prepareSGP with Data read in directly from SQLite database
parcc.db <- "../PARCC/Data/PARCC_Data_LONG.sqlite"
Washington_DC_SGP <- prepareSGP(
state = "DC",
data = rbindlist(list(
dbGetQuery(dbConnect(SQLite(), dbname = parcc.db), "select * from PARCC_Data_LONG_2015_2 where StateAbbreviation in ('DC')"),
dbGetQuery(dbConnect(SQLite(), dbname = parcc.db), "select * from PARCC_Data_LONG_2016_1 where StateAbbreviation in ('DC')"),
dbGetQuery(dbConnect(SQLite(), dbname = parcc.db), "select * from PARCC_Data_LONG_2016_2 where StateAbbreviation in ('DC')"))),
create.additional.variables=FALSE)
### analyzeSGP (for student growth percentiles)
Washington_DC_SGP <- analyzeSGP(
Washington_DC_SGP,
sgp.config=PARCC_2015_2016.2.config,
sgp.percentiles=TRUE,
sgp.projections=FALSE,
sgp.projections.lagged=FALSE,
sgp.percentiles.baseline=FALSE,
sgp.projections.baseline=FALSE,
sgp.projections.lagged.baseline=FALSE,
calculate.simex= TRUE,
get.cohort.data.info=TRUE,
parallel.config=list(
BACKEND="FOREACH", TYPE="doParallel",
SNOW_TEST=TRUE, WORKERS=list(TAUS = workers, SIMEX = workers)))
### analyzeSGP (for student growth projections)
Washington_DC_SGP <- analyzeSGP(
Washington_DC_SGP,
sgp.config=PARCC_2015_2016.2.config,
sgp.percentiles=FALSE,
sgp.projections=TRUE,
sgp.projections.lagged=TRUE,
sgp.percentiles.baseline=FALSE,
sgp.projections.baseline=FALSE,
sgp.projections.lagged.baseline=FALSE,
parallel.config = list(
BACKEND="FOREACH", TYPE="doParallel",
WORKERS=list(PROJECTIONS = workers, LAGGED_PROJECTIONS = workers)))
### combineSGP
Washington_DC_SGP <- combineSGP(
Washington_DC_SGP,
sgp.target.scale.scores=TRUE,
sgp.config=PARCC_2015_2016.2.config,
parallel.config = if (sgp.test) NULL else list(BACKEND="FOREACH", TYPE="doParallel", WORKERS=list(SGP_SCALE_SCORE_TARGETS = workers)))
### outputSGP
outputSGP(Washington_DC_SGP, outputSGP.directory=if (sgp.test) "Data/SIM" else "Data")
### Save results
save(Washington_DC_SGP, file="Data/Washington_DC_SGP.Rdata")SGP - Student Growth Percentiles SGP Blog | SGP GitHub Repo | SGP on CRAN