conTest {ConNEcT} | R Documentation |
Test significance
Description
Test significance
Usage
conTest(
data,
lag = 0,
conFun,
typeOfTest = "permut",
adCor = TRUE,
nBlox = 10,
nReps = 100
)
Arguments
data |
Binary time-points-by-variable matrix |
lag |
Non-negative integer indicating how much the second variable is lagged (default 0) |
conFun |
Contingency measure function (calculating the contingency value between two binary vectors). Built in: FunClassJacc, FunCorrJacc, FunKappa, FunOdds, FunLogOdds, FunPropAgree,FunPhiCC |
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 |
Value
A conTest-object including
allLinks
Matrix of pairwise calculated contingency measures
percentile
Matrix of raw percentiles, situating the observed value in the sample distribution
pValue
Matrix of the p-values (upper one-sided significance test) calculated by subtracting the percentile from 1.
para
: Saving the parameter settings for
typeOfTest
, adCor
, nBlox
, nReps
, funName
, lag
, varNames
samples
Saved generated replicates/samples for each variable combination under $NameVariable1$NameVariable2
Examples
signdata=cbind(c(1,0,1,0,1,0,1,0),c(1,1,1,1,0,0,0,0),c(0,0,0,0,0,0,1,1))
colnames(signdata) <-c ('momangry', 'momsad','adoangry')
conTest(data=signdata,lag=1,conFun=funClassJacc,typeOfTest='model',
adCor=FALSE)