Skip to content

Commit

Permalink
Merge pull request #1082 from dbetebenner/master
Browse files Browse the repository at this point in the history
Updating names for SGP_SIMEX_RANKED
  • Loading branch information
dbetebenner authored Apr 21, 2017
2 parents 72b4436 + f933d5a commit ceec338
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 22 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: SGP
Type: Package
Title: Student Growth Percentiles & Percentile Growth Trajectories
Version: 1.6-9.2
Date: 2017-4-19
Version: 1.7-0.0
Date: 2017-4-21
Authors@R: c(person(given=c("Damian", "W."), family="Betebenner", email="dbetebenner@nciea.org", role=c("aut", "cre")),
person(given=c("Adam", "R."), family="Van Iwaarden", email="avaniwaarden@gmail.com", role="aut"),
person(given="Ben", family="Domingue", email="ben.domingue@gmail.com", role="aut"),
Expand Down
2 changes: 1 addition & 1 deletion R/courseProgressionSGP.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function(
if (any(levels(sgp_object_subset[["GRADE_CHAR"]])=="CT")) {
levels(sgp_object_subset[["GRADE_CHAR"]])[which(levels(sgp_object_subset[["GRADE_CHAR"]])=="CT")] <- "EOCT"
}
suppressWarnings(invisible(sgp_object_subset[, CONTENT_AREA_by_GRADE:=paste(CONTENT_AREA, GRADE_CHAR, sep=".")]))
invisible(sgp_object_subset[, CONTENT_AREA_by_GRADE:=paste(CONTENT_AREA, GRADE_CHAR, sep=".")])
invisible(sgp_object_subset[,YEAR_INTEGER:=as.integer(as.factor(YEAR))])
invisible(sgp_object_subset[,CONTENT_AREA:=NULL])
invisible(sgp_object_subset[,GRADE_CHAR:=NULL])
Expand Down
24 changes: 11 additions & 13 deletions R/studentGrowthPercentiles.R
Original file line number Diff line number Diff line change
Expand Up @@ -684,20 +684,18 @@ function(panel.data, ## REQUIRED
if (is.null(save.matrices)) simex.coef.matrices <- NULL
if (calculate.simex.sgps) {
quantile.data.simex <- data.table(rbindlist(tmp.quantiles.simex), key=c("ID", "SIMEX_ORDER"))
invisible(quantile.data.simex[, RANK_SIMEX := as.integer(round(100*(rank(SGP_SIMEX, ties.method = "average")/length(SGP_SIMEX)), 0)), by = "SIMEX_ORDER"])
invisible(quantile.data.simex[, SGP_SIMEX_RANKED := as.integer(round(100*(rank(SGP_SIMEX, ties.method = "average")/length(SGP_SIMEX)), 0)), by = "SIMEX_ORDER"])
if (convert.0and100) {
invisible(quantile.data.simex[RANK_SIMEX==0L, RANK_SIMEX := 1L])
invisible(quantile.data.simex[RANK_SIMEX==100L, RANK_SIMEX := 99L])
invisible(quantile.data.simex[SGP_SIMEX_RANKED==0L, SGP_SIMEX_RANKED := 1L])
invisible(quantile.data.simex[SGP_SIMEX_RANKED==100L, SGP_SIMEX_RANKED := 99L])
}
setkey(quantile.data.simex, ID) # first key on ID and SIMEX_ORDER, then re-key on ID only to insure sorted order. Don't rely on rbindlist/k ordering...
} else quantile.data.simex <- data.table("ID"=NA, "SIMEX_ORDER"=NA, "SGP_SIMEX"=NA, "RANK_SIMEX"=NA) # set up empty data.table for ddcast and subsets below.
} else quantile.data.simex <- data.table("ID"=NA, "SIMEX_ORDER"=NA, "SGP_SIMEX"=NA, "SGP_SIMEX_RANKED"=NA) # set up empty data.table for ddcast and subsets below.
if (print.other.gp) {
tmp.quantile.data.simex <- ddcast(quantile.data.simex, ID ~ SIMEX_ORDER, value.var=setdiff(names(quantile.data.simex), c("ID", "SIMEX_ORDER")), sep="_ORDER_")
# setnames(tmp.quantile.data.simex, setdiff(names(tmp.quantile.data.simex), c("ID", "SGP_SIMEX", "SIMEX_ORDER")), paste("SGP_SIMEX_ORDER",
# setdiff(names(tmp.quantile.data.simex), c("ID", "SGP_SIMEX", "SIMEX_ORDER")), sep="_")) # Not needed once RANK_SIMEX included.
quantile.data.simex <- data.table(tmp.quantile.data.simex,
SGP_SIMEX=quantile.data.simex[c(which(!duplicated(quantile.data.simex, by=key(quantile.data.simex)))[-1L]-1L, dim(quantile.data.simex)[1L])][["SGP_SIMEX"]],
RANK_SIMEX=quantile.data.simex[c(which(!duplicated(quantile.data.simex, by=key(quantile.data.simex)))[-1L]-1L, dim(quantile.data.simex)[1L])][["RANK_SIMEX"]])
SGP_SIMEX_RANKED=quantile.data.simex[c(which(!duplicated(quantile.data.simex, by=key(quantile.data.simex)))[-1L]-1L, dim(quantile.data.simex)[1L])][["SGP_SIMEX_RANKED"]])
return(list(
DT=quantile.data.simex,
MATRICES = simex.coef.matrices))
Expand All @@ -708,7 +706,7 @@ function(panel.data, ## REQUIRED
MATRICES=simex.coef.matrices))
} else {
return(list(
DT=quantile.data.simex[c(which(!duplicated(quantile.data.simex, by=key(quantile.data.simex)))[-1L]-1L, dim(quantile.data.simex)[1L]), c("ID", "SGP_SIMEX", "RANK_SIMEX"), with=FALSE],
DT=quantile.data.simex[c(which(!duplicated(quantile.data.simex, by=key(quantile.data.simex)))[-1L]-1L, dim(quantile.data.simex)[1L]), c("ID", "SGP_SIMEX", "SGP_SIMEX_RANKED"), with=FALSE],
MATRICES=simex.coef.matrices))
}
}
Expand Down Expand Up @@ -1028,7 +1026,7 @@ function(panel.data, ## REQUIRED

tmp.objects <- c("Coefficient_Matrices", "Cutscores", "Goodness_of_Fit", "Knots_Boundaries", "Panel_Data", "SGPercentiles", "SGProjections", "Simulated_SGPs")
Coefficient_Matrices <- Cutscores <- Goodness_of_Fit <- Knots_Boundaries <- Panel_Data <- SGPercentiles <- SGProjections <- Simulated_SGPs <- SGP_STANDARD_ERROR <- Verbose_Messages <- NULL
SGP_SIMEX <- RANK_SIMEX <- SGP_NORM_GROUP_SCALE_SCORES <- SGP_NORM_GROUP_DATES <- SGP_NORM_GROUP <- NULL
SGP_SIMEX <- SGP_SIMEX_RANKED <- SGP_NORM_GROUP_SCALE_SCORES <- SGP_NORM_GROUP_DATES <- SGP_NORM_GROUP <- NULL

if (identical(class(panel.data), "list")) {
for (i in tmp.objects) {
Expand Down Expand Up @@ -1597,7 +1595,7 @@ function(panel.data, ## REQUIRED
quantile.data <- quantile.data[quantile.data.simex[["DT"]]]
} else {
quantile.data[, SGP_SIMEX:=quantile.data.simex[['DT']][["SGP_SIMEX"]]]
quantile.data[, RANK_SIMEX:=quantile.data.simex[['DT']][["RANK_SIMEX"]]]
quantile.data[, SGP_SIMEX_RANKED:=quantile.data.simex[['DT']][["SGP_SIMEX_RANKED"]]]
}
}

Expand Down Expand Up @@ -1648,8 +1646,8 @@ function(panel.data, ## REQUIRED

if (is.character(goodness.of.fit) || goodness.of.fit==TRUE) {
if (simex.tf) {
sgps.for.gof <- c("SGP", "SGP_SIMEX", "RANK_SIMEX")
sgps.for.gof.path <- c(tmp.path, paste(tmp.path, "SIMEX", sep="."), paste(tmp.path, "RANK_SIMEX", sep="."))
sgps.for.gof <- c("SGP", "SGP_SIMEX", "SGP_SIMEX_RANKED")
sgps.for.gof.path <- c(tmp.path, paste(tmp.path, "SIMEX", sep="."), paste(tmp.path, "SGP_SIMEX_RANKED", sep="."))
} else {
sgps.for.gof <- "SGP"
sgps.for.gof.path <- tmp.path
Expand Down Expand Up @@ -1741,7 +1739,7 @@ function(panel.data, ## REQUIRED
if (identical(sgp.labels[['my.extra.label']], "BASELINE") && "SGP_STANDARD_ERROR" %in% names(quantile.data)) setnames(quantile.data, gsub("SGP_STANDARD_ERROR", "SGP_BASELINE_STANDARD_ERROR", names(quantile.data)))
if (identical(sgp.labels[['my.extra.label']], "BASELINE") && "SGP_ORDER" %in% names(quantile.data)) setnames(quantile.data, gsub("SGP_ORDER", "SGP_BASELINE_ORDER", names(quantile.data)))
if (identical(sgp.labels[['my.extra.label']], "BASELINE") && "SGP_NORM_GROUP" %in% names(quantile.data)) setnames(quantile.data, gsub("SGP_NORM_GROUP", "SGP_NORM_GROUP_BASELINE", names(quantile.data)))
if (identical(sgp.labels[['my.extra.label']], "BASELINE") && simex.tf) setnames(quantile.data, gsub("_SIMEX", "_SIMEX_BASELINE", names(quantile.data))) # SGP_SIMEX and RANK_SIMEX
if (identical(sgp.labels[['my.extra.label']], "BASELINE") && simex.tf) setnames(quantile.data, gsub("_SIMEX", "_SIMEX_BASELINE", names(quantile.data))) # SGP_SIMEX and SGP_SIMEX_RANKED
if (identical(sgp.labels[['my.extra.label']], "EQUATED")) setnames(quantile.data, "SGP", "SGP_EQUATED")
if (identical(sgp.labels[['my.extra.label']], "EQUATED") && tf.growth.levels) setnames(quantile.data, "SGP_LEVEL", "SGP_LEVEL_EQUATED")
if (identical(sgp.labels[['my.extra.label']], "EQUATED") && "SGP_NORM_GROUP" %in% names(quantile.data)) setnames(quantile.data, gsub("SGP_NORM_GROUP", "SGP_NORM_GROUP_EQUATED", names(quantile.data)))
Expand Down
2 changes: 1 addition & 1 deletion R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ function(libname, pkgname) {
`.onAttach` <-
function(libname, pkgname) {
if (interactive()) {
packageStartupMessage(magenta$bold('SGP',paste(paste0(unlist(strsplit(as.character(packageVersion("SGP")), "[.]")), c(".", "-", ".", "")), collapse=""),' (4-19-2017). For help: >help("SGP") or visit https://github.com/CenterForAssessment/SGP/wiki'))
packageStartupMessage(magenta$bold('SGP',paste(paste0(unlist(strsplit(as.character(packageVersion("SGP")), "[.]")), c(".", "-", ".", "")), collapse=""),' (4-21-2017). For help: >help("SGP") or visit https://github.com/CenterForAssessment/SGP/wiki'))
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The **SGP** Package is open source software built for the [**R** software enviro

[![Build Status](https://travis-ci.org/CenterForAssessment/SGP.svg?branch=master)](https://travis-ci.org/CenterForAssessment/SGP)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/SGP)](http://cran.r-project.org/package=SGP)
[![Development Version](https://img.shields.io/badge/devel-1.6--9.2-brightgreen.svg)](https://github.com/CenterForAssessment/SGP)
[![Development Version](https://img.shields.io/badge/devel-1.7--0.0-brightgreen.svg)](https://github.com/CenterForAssessment/SGP)
[![Rstudio mirror downloads](http://cranlogs.r-pkg.org/badges/grand-total/SGP)](https://github.com/metacran/cranlogs.app)
[![License](http://img.shields.io/badge/license-GPL%203-brightgreen.svg?style=flat)](https://github.com/CenterForAssessment/SGP/blob/master/LICENSE.md)
[![Join the chat at https://gitter.im/CenterForAssessment/SGP](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/CenterForAssessment/SGP?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Expand Down
4 changes: 2 additions & 2 deletions inst/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ citEntry(entry = "Manual",
title = "{SGP}: Student Growth Percentiles \\& Percentile Growth Trajectories.",
author = "Damian W. Betebenner and Adam {VanIwaarden}, Ben Domingue and Yi Shang",
year = "2017",
note = "R package version 1.6-9.2",
note = "R package version 1.7-0.0",
url = "sgp.io",

textVersion = paste("Damian W. Betebenner, Adam VanIwaarden, Ben Domingue and Yi Shang (2017).",
"SGP: Student Growth Percentiles & Percentile Growth Trajectories.",
"(R package version 1.6-9.2)",
"(R package version 1.7-0.0)",
"URL: sgp.io"))
1 change: 1 addition & 0 deletions inst/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Changes in version: SGP_1.7-0.0

USER VISIBLE CHANGES:
o Adding in dual mode for RLI analyses to be performed using RASCH scores (default) or STAR scores
o Better accomodation of duplicates in data. Nonetheless, MUCH better to get rid of duplicates

Changes in version: SGP_1.6-0.0

Expand Down
4 changes: 2 additions & 2 deletions man/SGP-package.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ growth projections to be calculated across assessment transitions by equating th
\tabular{ll}{
Package: \tab SGP\cr
Type: \tab Package\cr
Version: \tab 1.6-9.2\cr
Date: \tab 2017-4-19\cr
Version: \tab 1.7-0.0\cr
Date: \tab 2017-4-21\cr
License: \tab GPL-3\cr
LazyLoad: \tab yes\cr
}
Expand Down

0 comments on commit ceec338

Please sign in to comment.