diff --git a/DESCRIPTION b/DESCRIPTION index b17c3d5f3..b69ac92cd 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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"), diff --git a/R/courseProgressionSGP.R b/R/courseProgressionSGP.R index fd5e9df05..8f784f31a 100644 --- a/R/courseProgressionSGP.R +++ b/R/courseProgressionSGP.R @@ -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]) diff --git a/R/studentGrowthPercentiles.R b/R/studentGrowthPercentiles.R index 1313701b9..87044dd9c 100644 --- a/R/studentGrowthPercentiles.R +++ b/R/studentGrowthPercentiles.R @@ -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)) @@ -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)) } } @@ -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) { @@ -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"]]] } } @@ -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 @@ -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))) diff --git a/R/zzz.R b/R/zzz.R index 680945861..ccd86ac02 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -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')) } } diff --git a/README.md b/README.md index d2706906d..c05225b13 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/inst/CITATION b/inst/CITATION index fd2166557..895462c8f 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -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")) diff --git a/inst/NEWS b/inst/NEWS index 0e28c21f4..f52ef4097 100644 --- a/inst/NEWS +++ b/inst/NEWS @@ -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 diff --git a/man/SGP-package.Rd b/man/SGP-package.Rd index a849d91ff..7d85ac6da 100644 --- a/man/SGP-package.Rd +++ b/man/SGP-package.Rd @@ -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 }