conNEcT {ConNEcT}R Documentation

Calculate the link strength between multiple behaviors and return them as a matrix (optionally discarting all non-significant links)

Description

Calculate the link strength between multiple behaviors and return them as a matrix (optionally discarting all non-significant links)

Usage

conNEcT(
  data,
  lag = 0,
  conFun,
  test = FALSE,
  typeOfTest = "permut",
  adCor = TRUE,
  nBlox = 10,
  nReps = 100,
  signLev = 0.05
)

Arguments

data

Binary time-points-by-variable matrix

lag

Non-negative integer indicating how many time points the second variable is lagged (default 0)

conFun

Contingency measure function (calculating the contingency value between two binary vectors). Built in: funPropAgree, funClassJacc, funKappa, funCorrJacc, funOdds, funLogOdds, funPhiCC

test

Logic indicationg whether a significance test is executed (TRUE) or not (FALSE;default)

typeOfTest

String indicating whether a model-based ('model') or a permutation-based ('permut'; default) data generation approach is used.

adCor

Logic indicating the auto-dependence correction should be applied (TRUE; default) or not (FALSE)

nBlox

Number indicating the number of segments (default 10). Necessary for permutation-based test, accounting for auto-dependence (typeOfTest='permut'; adCor=TRUE)

nReps

Number of replicates/samples that is used to generate the test distribution

signLev

Significance level of the test (default 0.05)

Value

A conNEcT-object including

allLinks Matrix of pairwise calculated contingency measures

signLinksMatrix of pairwise calculated contingency measures containing only significant links (others are set to 0)

pValue P-values for the one-sided upper significance test

para Parameter settings containing lag, test,typeOfTest, adCor, nBlox, nReps, funName, and varNames

probs Table of relative frequency and auto-dependency

Examples

netdata=cbind(rep(c(1,1,1,1,1,0,0,0,0,0),100),
rep(c(0,0,1,1,1,1,0,0,0,0),100))
conNEcT(netdata,lag=1,conFun=funKappa,test=TRUE,nBlox=5)

[Package ConNEcT version 0.7.27 Index]