permDif: Test the difference of the network connectivity between two...

Description Usage Arguments Value Examples

View source: R/permDif.R

Description

The predictors are the variables specified in "vars=", with "L1" added to the name. Note that these variables must exist in the data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
permDif(
  dat,
  vars,
  covs = NULL,
  group,
  subjnr,
  randomVars = NULL,
  subset = NULL,
  type = "lagged",
  perms = 50,
  optim = "bobyqa"
)

Arguments

dat

data frame

vars

vector with the names of the dependent variables.

covs

vector with the names of the covariates.

group

dichotomous variable that indicates the two groups to be compared

subjnr

identification number of the subjects

randomVars

vector, indicating which variables should be included as random effects. If "all" then all fixed effects are taken. If "null" only intercept is used as random effect.

subset

subset of predictor variables which are compared in summary statistics. If null then result is also null.

type

type of analyses: lagged ("lagged") or contemporaneous predictors ("contemp")

perms

number of permutations.

optim

optimizer used in lmer, options: "bobyqa" or "Nelder_Mead", see lmerControl (lme4)

Value

Estimate of difference between groups wrt network connectivity with p value based on permutations. and permutation distribution. The p-values for differences of all individual paths and of summaries are given. Also p-values for the differences of the centrality measures inDegree and outDegree are given.

Examples

1
2
3
4
data("gratitude")
vars <- c("pa_1","pa_2","pa_3","na_1","na_2","na_3")
out <- permDif(dat=gratitude,vars=vars, group="wellBeing", subjnr="subjnr",
randomVars = FALSE, perms = 10) 

PeterVerboon/lagnetw documentation built on Aug. 4, 2020, 5:16 p.m.