aMNLFA.DIFplot {aMNLFA}R Documentation

aMNLFA plotting function for aMNLFA.prune() results

Description

This function gives the user a plot corresponding to loading, intercept, or threshold DIF from the aMNLFA.prune() function

Usage

aMNLFA.DIFplot(diflist, diftype, log = FALSE)

Arguments

diflist

The listing of results from aMNLFA.prune(), which contains the DIF tables (as well as impact tables, which aren't used here)

diftype

The type of DIF the user wants plot for. Options include "loading" (for loading DIF), "intercept" (for intercept DIF when threshold DIF is not tested), "threshold.highest" (which uses only the largest test statistic across all categories when threshold DIF is tested), and "threshold.all" (which uses the test statistic for all categories when threshold DIF is tested)

log

Logical. If TRUE, plot the y axis on a log scale. Defaults to FALSE.

Value

No return value; generates a plot using base R.

Examples

 ## Not run: 
 wd <- tempdir()
 first<-paste0(system.file(package='aMNLFA'),"/extdata")
 the.list <- list.files(first,full.names=TRUE)
 file.copy(the.list,wd,overwrite=TRUE)
   
 ob <- aMNLFA::aMNLFA.object(dir = wd, 
 mrdata = xstudy, 
 indicators = paste0("BIN_", 1:12),
 catindicators = paste0("BIN_", 1:12), 
 meanimpact = c("AGE", "GENDER", "STUDY"), 
 varimpact = c("AGE", "GENDER", "STUDY"), 
 measinvar = c("AGE", "GENDER", "STUDY"),
 factors = c("GENDER", "STUDY"),
 ID = "ID",
 thresholds = FALSE)
 
 prune.object <- aMNLFA.prune(ob)
 aMNLFA.DIFplot(prune.object, "loading", log = FALSE)
 
## End(Not run)

[Package aMNLFA version 1.1.2 Index]