sigs: Grab significant models

Usage Arguments Examples

Usage

1
sigs(logDIFobject, items = NULL, alpha = 0.05)

Arguments

logDIFobject
items
alpha

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (logDIFobject, items = NULL, alpha = 0.05) 
{
    n <- length(logDIFobject)
    sn <- which(sapply(1:n, function(i) logDIFobject[[i]][[1]][["Pr(>Chi)"]][2] < 
        alpha))
    SIG <- lapply(sn, function(i) logDIFobject[[i]])
    names(logDIFobject)
    LOG <- data.frame(item = paste0("ITEM_", 1:length(logDIFobject)))
    LOG$DIF_DETECTED <- sapply(seq_along(logDIFobject), function(i) logDIFobject[[i]][["OMNIBUS BLOCK 1: DIF (INTERACTION to NULL)"]][["Pr(>Chi)"]][2] < 
        0.05)
    LOG$UNIFORM_DIF <- sapply(seq_along(logDIFobject), function(i) logDIFobject[[i]][["OMNIBUS BLOCK 2: UNIFORM DIF (ADDIITIVE to NULL)"]][["Pr(>Chi)"]][2] < 
        0.05)
    LOG$NONUNIFORM_DIF <- sapply(seq_along(logDIFobject), function(i) logDIFobject[[i]][["OMNIBUS BLOCK 3: NON-UNIFORM DIF (INTERACTION TO ADDITIVE)"]][["Pr(>Chi)"]][2] < 
        0.05)
    if (!is.null(items)) {
        LOG <- cbind(LOG[, 1, drop = FALSE], left.just(items), 
            LOG[, -1])
    }
    return(LOG)
  }

trinker/DIFdetect documentation built on May 31, 2019, 8:40 p.m.