Skip to content

Commit 61c2ec7

Browse files
committed
report absolute values for (G)CSIBTEST
1 parent 46b5db3 commit 61c2ec7

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

R/SIBTEST.R

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@
100100
#' bias/DIF from group ability differences and detect test bias/DTF as well as item bias/DIF.
101101
#' \emph{Psychometrika, 58}, 159-194.
102102
#'
103+
#' @return a \code{data.frame} type object containing the SIBTEST results. Note that
104+
#' the \code{beta} coefficient for (G)CSIBTEST are reported as absolute values to
105+
#' reflect the sum of the respective area information above and below
106+
#' the estimated crossing locations
107+
#'
103108
#' @examples
104109
#'
105110
#' \donttest{
@@ -494,7 +499,7 @@ SIBTEST <- function(dat, group, suspect_set, match_set, focal_name = unique(grou
494499
sigma_cross <- NA
495500
ret <- data.frame(focal_group=focal_name, n_matched_set=length(match_set),
496501
n_suspect_set = length(suspect_set),
497-
beta = c(beta_uni, beta_cross), SE=c(sigma_uni, NA),
502+
beta = c(beta_uni, abs(beta_cross)), SE=c(sigma_uni, NA),
498503
X2=c(X2_uni, X2_cross),
499504
df=c(1, df), p = c(p_uni, p_cross))
500505
rownames(ret) <- c('SIBTEST', 'CSIBTEST')
@@ -716,13 +721,13 @@ SIBTEST <- function(dat, group, suspect_set, match_set, focal_name = unique(grou
716721
if(nrow(C) == 1L){
717722
ret <- data.frame(n_matched_set=length(match_set),
718723
n_suspect_set = length(suspect_set),
719-
beta = c(beta_uni, beta_cross),
724+
beta = c(beta_uni, abs(beta_cross)),
720725
X2=c(X2_uni, X2_cross),
721726
df=c(1, NA), p = c(p_uni, NA))
722727
rownames(ret) <- c('GSIBTEST', 'GCSIBTEST')
723728
class(ret) <- c('mirt_df', 'data.frame')
724729
} else {
725-
mat1 <- rbind(as.vector(beta_uni), beta_cross)
730+
mat1 <- rbind(as.vector(beta_uni), abs(beta_cross))
726731
colnames(mat1) <- paste0('beta_', 1:nrow(C))
727732
ret <- data.frame(n_matched_set=length(match_set),
728733
n_suspect_set = length(suspect_set),

man/SIBTEST.Rd

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)