local.independence: Detect local dependence

View source: R/local.independence.R

local.independenceR Documentation

Detect local dependence

Description

Investigate items for local independence

Usage

local.independence(do=NULL,resp=NULL,items=1:do$recursive.structure[1],digits=2,verbose=T)

Arguments

do

an object of class digram.object

resp

A data.frame or matrix of recoded data (only used if do is NULL)

items

A vector of columns from the recoded data to include as items in the analysis or a character vector of variable labels

p.adj

the kind of multiple p-value testing adjustment to be used (one of "holm", "BH","hochberg", "hommel", "bonferroni", "BY", "none"), see p.adjust().

digits

Number of digits in table

max.name.length

Maximum length of item names (to be printed in tables)

only.significant

Only list fit values significantly different from 1

use.names

Use item names instead of item labels as node labels

summarize.testlets

If true, don't collapse testlets, but summarize number of local dependent item pairs (both ways) in each testlet. Asterisk (*) indicates one or more negative gamme correlations.

verbose

Print results

extra.verbose

Print warnings in PDF and HTML-output

draw.graph

Draw graph of Local Dependencies

list.LD

List item pairs being locally dependent

saved.result

To avoid repeated calculation, you can provide a saved version of the analysis (returned from local.independence())

caption

Caption for the LD table (in Rmarkdown)

Details

Second step in item screening: Analysis of DIF and local dependence

C4

Y_a \bot Y_b \mid R_a and Y_a \bot Y_b \mid R_b

Conditional independence of A and B given C is denoted as A \bot B \mid C. Use item.DIF() for detection of Differential Item Functioning

If you want to use this function in R Markdown or Bookdown, you need to use xelatex as latex engine, and you need to force dev to use cairo_pdf or png. Add this in you yaml header:

output:
pdf_document:
latex_engine: xelatex

Add this in your setup chunk:

knitr::opts_chunk$set(echo = TRUE, dev = "cairo_pdf", dpi = 300)

Value

Returns a list of local dependencies

Author(s)

Jeppe Bundsgaard jebu@edu.au.dk

References

Kreiner, S. & Christensen, K.B. (2011). Item Screening in Graphical Loglinear Rasch Models. Psychometrika, vol. 76, no. 2, pp. 228-256. DOI: 10.1007/s11336-9203-Y

See Also

partgam_LD(), item.DIF()

Examples

local.independence(DHP)

jeppebundsgaard/RDigram documentation built on Oct. 29, 2023, 7:15 p.m.