test.bootSemNeT: Statistical tests for 'bootSemNeT'

test.bootSemNeTR Documentation

Statistical tests for bootSemNeT

Description

Computes statistical tests for bootstrapped networks from bootSemNeT

Usage

test.bootSemNeT(
  ...,
  test = c("ANCOVA", "ANOVA", "t-test"),
  measures = c("ASPL", "CC", "Q"),
  formula = NULL,
  groups = NULL
)

Arguments

...

Object(s) from bootSemNeT

test

Character. Type of statistical test to be used.

  • "t-test" Computes t-tests for all measures

  • "ANOVA" Computes ANOVAs and includes Tukey's HSD for pairwise comparisons (TukeyHSD)

  • "ANCOVA" Computes ANCOVAs that control for the number of nodes and edges in the networks and includes adjusted means and Tukey's HSD for pairwise comparisons (TukeyHSD)

measures

Character. Network measures to be tested.

  • ASPL Average shortest path length

  • CC Clustering coefficient

  • Q Modularity statistic

formula

Character. A formula for specifying an ANOVA structure. The formula should have the predictor variable as "y" and include the names the variables are grouped by (e.g., formula = "y ~ group_var1 * group_var2"). See Two-way ANOVA example in examples

groups

Data frame. A data frame specifying the groups to be input into the formula. The column names should be the variable names of interest. The groups should be in the same order as the groups input into bootSemNeT

Value

Returns a list containing the objects:

ASPL

Test statistics for each proportion of nodes remaining for ASPL

CC

Test statistics for each proportion of nodes remaining for CC

Q

Test statistics for each proportion of nodes remaining for Q

If two groups:

A matrix in each object has the following columns:

t-statistic

Statistic from the t.test

df

Degrees of freedom

p-value

p-value with values equal to 0 being p < .001

d

Cohen's d

CI95.lower

Lower bound of the 95 percent confidence interval

CI95.upper

Upper bound of the 95 percent confidence interval

Direction

Direction of the effect. The argument groups will specify specifically which group is higher or lower on the measure. If no groups are input, then "d" and "p" are used to represent data and paired samples from bootSemNeT, respectively

Row names refer to the proportion of nodes remaining in bootstrapped networks

If three or more groups:

A list containing two objects:

ANOVA

A matrix containing the F-statistic, group degrees of freedom, residual degrees of freedom, p-value, and partial eta squared p.eta.sq

HSD

A matrix containing the differences between each group (diff), lower (lwr) and upper (upr) bounds of the 95% confidence interval, and the adjusted p-value (p.adj)

Author(s)

Alexander Christensen <alexpaulchristensen@gmail.com>

Examples

# Simulate Dataset
one <- sim.fluency(20)
two <- sim.fluency(20)

# Run partial bootstrap networks
two.result <- bootSemNeT(one, two, prop = .50, iter = 100,
sim = "cosine", cores = 2, type = "node", method = "TMFG")

# Compute tests
test.bootSemNeT(two.result)


# Two-way ANOVA example
## Simulated data
hihi <- sim.fluency(50, 500)
hilo <- sim.fluency(50, 500)
lohi <- sim.fluency(50, 500)
lolo <- sim.fluency(50, 500)

## Create groups
groups <- matrix(
c("high", "high",
"high", "low",
"low", "high",
"low", "low"
), ncol = 2, byrow = TRUE)

## Change column names (variable names)
colnames(groups) <- c("gf","caq")

## Run partial bootstrap networks
boot.fifty <- bootSemNeT(hihi, hilo, lohi, lolo, prop = .50,
type = "node", method = "TMFG", cores = 2, iter = 100)
boot.sixty <- bootSemNeT(hihi, hilo, lohi, lolo, prop = .60,
type = "node", method = "TMFG", cores = 2, iter = 100)

## Compute tests
test.bootSemNeT(boot.fifty, boot.sixty,
test = "ANOVA", formula = "y ~ gf*caq", groups = groups)



SemNeT documentation built on Aug. 12, 2023, 5:06 p.m.