Skip to content

Commit 7cd93e7

Browse files
committed
Adding in Hawaii SGPt matrices
1 parent 8c24235 commit 7cd93e7

File tree

8 files changed

+26
-13
lines changed

8 files changed

+26
-13
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: SGPmatrices
22
Type: Package
33
Title: Baseline Coefficient Matrices for SGP Analyses
4-
Version: 0.1-2.0
5-
Date: 2025-4-21
4+
Version: 0.1-3.0
5+
Date: 2025-12-23
66
Authors@R: c(person(given=c("Damian", "W."), family="Betebenner", email="[email protected]", role=c("aut", "cre")),
77
person(given=c("Adam", "R."), family="Van Iwaarden", email="[email protected]", role="aut"))
88
Maintainer: Damian W. Betebenner <[email protected]>

R/addBaselineMatrices.R

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,33 @@
11
`addBaselineMatrices` <-
22
function(state,
33
year,
4-
add.matrices.to.which.state=NULL) {
4+
add.matrices.to.which.state=NULL,
5+
SGPt = FALSE) {
56

67
SGPstateData <- SGP::SGPstateData ### Needed due to assignment of values to SGPstateData
78

89
### Utility function
9-
getMatrixLabel <- function(state, year, add.matrices.to.which.state) {
10+
getMatrixLabel <- function(state, year, add.matrices.to.which.state, SGPt) {
1011
if (!paste(state, "Baseline_Matrices", sep="_") %in% names(SGPmatrices::SGPmatrices)) {
1112
stop(paste("\tNOTE: Baseline matrices for state:", state, "not in SGPmatrices. Contact package maintainer to have baseline matrices added to package."))
1213
}
1314
tmp.years <- names(SGPmatrices::SGPmatrices[[paste(state, "Baseline_Matrices", sep="_")]])
1415
if (year < sort(tmp.years)[1]) stop("NOTE: Supplied year precedes years associated with baseline matrices in package. Contact package developer if you think this is in error.")
1516
if (!year %in% tmp.years) year <- tmp.years[which(year==sort(c(tmp.years, year)))-1L]
16-
matrix.label <- paste0("SGPmatrices::SGPmatrices[['", paste(state, "Baseline_Matrices", sep="_"), "']][['", year, "']]")
17-
message(paste0("\tNOTE: Adding ", SGP::getStateAbbreviation(state, type="Long"), " (", state, ") ", year, " baseline matrices to SGPstateData for state ",
17+
if (!SGPt) {
18+
matrix.label <- paste0("SGPmatrices::SGPmatrices[['", paste(state, "Baseline_Matrices", sep="_"), "']][['", year, "']]")
19+
message(paste0("\tNOTE: Adding ", SGP::getStateAbbreviation(state, type="Long"), " (", state, ") ", year, " baseline matrices to SGPstateData for state ",
1820
add.matrices.to.which.state))
21+
} else {
22+
matrix.label <- paste0("SGPmatrices::SGPmatrices[['", paste(state, "SGPt_Baseline_Matrices", sep="_"), "']][['", year, "']]")
23+
message(paste0("\tNOTE: Adding ", SGP::getStateAbbreviation(state, type="Long"), " (", state, ") ", year, " SGPt baseline matrices to SGPstateData for state ",
24+
add.matrices.to.which.state))
25+
}
1926
return(matrix.label)
2027
}
2128

2229
if (is.null(add.matrices.to.which.state)) add.matrices.to.which.state <- state
2330

24-
SGPstateData[[add.matrices.to.which.state]][["Baseline_splineMatrix"]][["Coefficient_Matrices"]] <- eval(parse(text=getMatrixLabel(state, year, add.matrices.to.which.state)))
31+
SGPstateData[[add.matrices.to.which.state]][["Baseline_splineMatrix"]][["Coefficient_Matrices"]] <- eval(parse(text=getMatrixLabel(state, year, add.matrices.to.which.state, SGPt)))
2532
return(SGPstateData)
2633
} ### END addBaselineMatrices

R/zzz.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function(libname, pkgname) {
3232

3333
# Define a friendly startup message
3434
message_text <- paste0(
35-
magenta(bold("\uD83C\uDF89 SGPmatrices v", installed.version, sep="")), " - ", toOrdinal::toOrdinalDate("2025-4-21"), "\n",
35+
magenta(bold("\uD83C\uDF89 SGPmatrices v", installed.version, sep="")), " - ", toOrdinal::toOrdinalDate("2025-12-23"), "\n",
3636
strrep("\u2501", 40), "\n",
3737
bold("\U1F4E6 CRAN: "), cran.version, "\n",
3838
bold("\U1F527 Dev: "), dev.version, "\n",

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ The baseline coefficient matrices embedded in **SGPmatrices** are updated period
1919
* AZ_Baseline_Matrices: Contains 2021 baseline matrices for Arizona AzM2.
2020
* CO_Baseline_Matrices: Contains 2021 baseline matrices for Colorado CMAS.
2121
* HI_Baseline_Matrices: Contains 2021 baseline matrices for Hawaii SBA.
22+
* HI_SGPt_Baseline_Matrices: Contains 2021 SGPt time-dependent baseline matrices for Hawaii SBA.
2223
* IN_Baseline_Matrices: Contains 2021 baseline matrices for Indiana ILEARN/ISTEP+.
2324
* MA_Baseline_Matrices: Contains 2021 baseline matrices for Massachusetts MCAS 2.0/PARCC.
2425
* MI_Baseline_Matrices: Contains 2021 baseline matrices for Michigan MSTEP/PSAT/SAT.

data/SGPmatrices.rda

289 KB
Binary file not shown.

inst/CITATION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ citEntry(entry = "Manual",
44
title = "{SGPmatrices}: Baseline coefficient matrices for SGP analyses.",
55
author = "Damian W. Betebenner and Adam R. Van Iwaarden",
66
year = "2025",
7-
note = "R package version 0.1-2.0",
7+
note = "R package version 0.1-3.0",
88
url = "https://github.com/CenterForAssessment/SGPmatrices/",
99

1010
textVersion = paste("Damian W. Betebenner and Adam R. Van Iwaarden (2025).",
1111
"SGPmatrices: Baseline coefficient matrices for SGP analyses.",
12-
"(R package version 0.1-2.0",
12+
"(R package version 0.1-3.0",
1313
"URL https://github.com/CenterForAssessment/SGPmatrices/")
1414
)

man/SGPmatrices-package.Rd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
\tabular{ll}{
1111
Package: \tab SGPmatrices\cr
1212
Type: \tab Package\cr
13-
Version: \tab 0.1-2.0\cr
14-
Date: \tab 2025-4-21\cr
13+
Version: \tab 0.1-3.0\cr
14+
Date: \tab 2025-12-23\cr
1515
License: \tab GPL-3\cr
1616
LazyLoad: \tab Yes\cr
1717
LazyData: \tab Yes\cr

man/addBaselineMatrices.Rd

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ The function addBaselineMatrices adds baseline matrices contained in the SGPmatr
99
addBaselineMatrices(
1010
state,
1111
year,
12-
add.matrices.to.which.state=NULL)
12+
add.matrices.to.which.state=NULL,
13+
SGPt = FALSE)
1314
}
1415

1516
\arguments{
@@ -19,6 +20,10 @@ addBaselineMatrices(
1920
}
2021
\item{add.matrices.to.which.state}{A character string for the state/assessment abbreviation where the baseline matrices will be placed in SGPstateData. If not argument is supplied the default is to use the state/assessment abbreviation supplied via the argument \code{state}.
2122
}
23+
\item{SGPt}{A logical value indicating whether to add SGPt baseline matrices. If not argument is supplied the default is to use the value of \code{SGPt} embedded in the SGPstateData object.
24+
If \code{SGPt} is \code{TRUE}, the function will add SGPt baseline matrices to the SGPstateData object.
25+
If \code{SGPt} is \code{FALSE}, the function will add baseline matrices to the SGPstateData object.
26+
}
2227
}
2328

2429
\value{Returns SGPstateData with the matrices associated with argument \code{state} embedded in the position associated with the argument \code{add.matrices.to.state} (defaults to \code{state}).

0 commit comments

Comments
 (0)